Skip to content

Commit 33d8fce

Browse files
committed
Add setRequestMatcher to PublicKeyCredentialCreationOptionsFilter
1 parent 6bbf3f6 commit 33d8fce

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

web/src/main/java/org/springframework/security/web/webauthn/registration/PublicKeyCredentialCreationOptionsFilter.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.springframework.security.core.context.SecurityContext;
3939
import org.springframework.security.core.context.SecurityContextHolder;
4040
import org.springframework.security.core.context.SecurityContextHolderStrategy;
41+
import org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher;
4142
import org.springframework.security.web.util.matcher.RequestMatcher;
4243
import org.springframework.security.web.webauthn.api.PublicKeyCredentialCreationOptions;
4344
import org.springframework.security.web.webauthn.jackson.WebauthnJackson2Module;
@@ -82,6 +83,15 @@ public PublicKeyCredentialCreationOptionsFilter(WebAuthnRelyingPartyOperations r
8283
this.rpOperations = rpOperations;
8384
}
8485

86+
/**
87+
* Use the given {@link ServerWebExchangeMatcher} to match the request.
88+
* @param matcher {@link ServerWebExchangeMatcher}
89+
*/
90+
public void setRequestMatcher(ServerWebExchangeMatcher matcher) {
91+
Assert.notNull(matcher, "matcher cannot be null");
92+
this.matcher = matcher;
93+
}
94+
8595
@Override
8696
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
8797
throws ServletException, IOException {

0 commit comments

Comments
 (0)