Skip to content

Commit

Permalink
Add setRequestMatcher to WebAuthnRegistrationFilter
Browse files Browse the repository at this point in the history
Signed-off-by: smallbun <[email protected]>
  • Loading branch information
topiam authored and leshalv committed Feb 1, 2025
1 parent ead4eda commit 7d3f94e
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,24 @@ public WebAuthnRegistrationFilter(UserCredentialRepository userCredentials,
this.rpOptions = rpOptions;
}

/**
* Sets the {@link RequestMatcher} used to trigger this filter.
* @param registerCredentialMatcher the {@link RequestMatcher} to use
*/
public void setRegisterCredentialMatcher(RequestMatcher registerCredentialMatcher) {
Assert.notNull(registerCredentialMatcher, "registerCredentialMatcher cannot be null");
this.registerCredentialMatcher = registerCredentialMatcher;
}

/**
* Sets the {@link RequestMatcher} used to trigger this filter.
* @param removeCredentialMatcher the {@link RequestMatcher} to use
*/
public void setRemoveCredentialMatcher(RequestMatcher removeCredentialMatcher) {
Assert.notNull(removeCredentialMatcher, "removeCredentialMatcher cannot be null");
this.removeCredentialMatcher = removeCredentialMatcher;
}

@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
Expand Down

0 comments on commit 7d3f94e

Please sign in to comment.