From aedbc70cecd1aa9d0cf2fea2ea5b207a4eed2363 Mon Sep 17 00:00:00 2001 From: topiam Date: Tue, 4 Feb 2025 22:27:05 +0800 Subject: [PATCH] Add setRequestMatcher to the relevant filters. Signed-off-by: smallbun <2689170096@qq.com> --- .../PublicKeyCredentialRequestOptionsFilter.java | 4 ++-- .../registration/WebAuthnRegistrationFilter.java | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/web/src/main/java/org/springframework/security/web/webauthn/authentication/PublicKeyCredentialRequestOptionsFilter.java b/web/src/main/java/org/springframework/security/web/webauthn/authentication/PublicKeyCredentialRequestOptionsFilter.java index ddd1fc7109..26abf556f2 100644 --- a/web/src/main/java/org/springframework/security/web/webauthn/authentication/PublicKeyCredentialRequestOptionsFilter.java +++ b/web/src/main/java/org/springframework/security/web/webauthn/authentication/PublicKeyCredentialRequestOptionsFilter.java @@ -76,8 +76,8 @@ public PublicKeyCredentialRequestOptionsFilter(WebAuthnRelyingPartyOperations rp } /** - * Sets the {@link RequestMatcher} used to trigger this filter. - * By default, the {@link RequestMatcher} is {@code POST /webauthn/authenticate/options}. + * 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 */ diff --git a/web/src/main/java/org/springframework/security/web/webauthn/registration/WebAuthnRegistrationFilter.java b/web/src/main/java/org/springframework/security/web/webauthn/registration/WebAuthnRegistrationFilter.java index fb5c416436..22a2d3c30f 100644 --- a/web/src/main/java/org/springframework/security/web/webauthn/registration/WebAuthnRegistrationFilter.java +++ b/web/src/main/java/org/springframework/security/web/webauthn/registration/WebAuthnRegistrationFilter.java @@ -106,8 +106,9 @@ public WebAuthnRegistrationFilter(UserCredentialRepository userCredentials, } /** - * Sets the {@link RequestMatcher} to trigger this filter's the credential registration operation . - * By default, the {@link RequestMatcher} is {@code POST /webauthn/register}. + * 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 */ @@ -117,8 +118,9 @@ public void setRegisterCredentialMatcher(RequestMatcher registerCredentialMatche } /** - * Sets the {@link RequestMatcher} to trigger this filter's the credential removal operation . - * By default, the {@link RequestMatcher} is {@code DELETE /webauthn/register/{id}}. + * 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 */