Skip to content

Commit

Permalink
Add setRequestMatcher to the relevant filters.
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 4, 2025
1 parent 7d3f94e commit 2a85798
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ public PublicKeyCredentialRequestOptionsFilter(WebAuthnRelyingPartyOperations rp

/**
* Sets the {@link RequestMatcher} used to trigger this filter.
* By default, the {@link RequestMatcher} is {@code POST /webauthn/authenticate/options}.
* @param requestMatcher the {@link RequestMatcher} to use
* @since 6.5
*/
public void setRequestMatcher(RequestMatcher requestMatcher) {
Assert.notNull(requestMatcher, "requestMatcher cannot be null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ public PublicKeyCredentialCreationOptionsFilter(WebAuthnRelyingPartyOperations r

/**
* Sets the {@link RequestMatcher} used to trigger this filter.
* <p>
* By default, the {@link RequestMatcher} is {@code POST /webauthn/register/options}.
* @param requestMatcher the {@link RequestMatcher} to use
* @since 6.5
*/
public void setRequestMatcher(RequestMatcher requestMatcher) {
Assert.notNull(requestMatcher, "requestMatcher cannot be null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,21 @@ public WebAuthnRegistrationFilter(UserCredentialRepository userCredentials,
}

/**
* Sets the {@link RequestMatcher} used to trigger this filter.
* Sets the {@link RequestMatcher} to trigger this filter's the credential registration operation .
* By default, the {@link RequestMatcher} is {@code POST /webauthn/register}.
* @param registerCredentialMatcher the {@link RequestMatcher} to use
* @since 6.5
*/
public void setRegisterCredentialMatcher(RequestMatcher registerCredentialMatcher) {
Assert.notNull(registerCredentialMatcher, "registerCredentialMatcher cannot be null");
this.registerCredentialMatcher = registerCredentialMatcher;
}

/**
* Sets the {@link RequestMatcher} used to trigger this filter.
* Sets the {@link RequestMatcher} to trigger this filter's the credential removal operation .
* By default, the {@link RequestMatcher} is {@code DELETE /webauthn/register/{id}}.
* @param removeCredentialMatcher the {@link RequestMatcher} to use
* @since 6.5
*/
public void setRemoveCredentialMatcher(RequestMatcher removeCredentialMatcher) {
Assert.notNull(removeCredentialMatcher, "removeCredentialMatcher cannot be null");
Expand Down

0 comments on commit 2a85798

Please sign in to comment.