File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
config/src/main/java/org/springframework/security/config/annotation/web/configurers Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 3535import org .springframework .security .web .authentication .ui .DefaultResourcesFilter ;
3636import org .springframework .security .web .authentication .www .BasicAuthenticationFilter ;
3737import org .springframework .security .web .csrf .CsrfToken ;
38- import org .springframework .security .web .util .matcher .AnyRequestMatcher ;
3938import org .springframework .security .web .webauthn .api .PublicKeyCredentialRpEntity ;
4039import org .springframework .security .web .webauthn .authentication .PublicKeyCredentialRequestOptionsFilter ;
4140import org .springframework .security .web .webauthn .authentication .WebAuthnAuthenticationFilter ;
@@ -159,8 +158,7 @@ public void init(H http) throws Exception {
159158 ExceptionHandlingConfigurer <H > exceptions = http .getConfigurer (ExceptionHandlingConfigurer .class );
160159 if (exceptions != null ) {
161160 AuthenticationEntryPoint entryPoint = new LoginUrlAuthenticationEntryPoint ("/login" );
162- exceptions .defaultDeniedHandlerForMissingAuthority (
163- (ep ) -> ep .addEntryPointFor (entryPoint , AnyRequestMatcher .INSTANCE ),
161+ exceptions .defaultDeniedHandlerForMissingAuthority ((ep ) -> ep .defaultEntryPoint (entryPoint ),
164162 GrantedAuthorities .FACTOR_WEBAUTHN_AUTHORITY );
165163 }
166164 }
Original file line number Diff line number Diff line change 3939import org .springframework .security .web .authentication .preauth .x509 .X509AuthenticationFilter ;
4040import org .springframework .security .web .authentication .preauth .x509 .X509PrincipalExtractor ;
4141import org .springframework .security .web .context .RequestAttributeSecurityContextRepository ;
42- import org .springframework .security .web .util .matcher .AnyRequestMatcher ;
4342
4443/**
4544 * Adds X509 based pre authentication to an application. Since validating the certificate
@@ -187,8 +186,7 @@ public void init(H http) {
187186 ExceptionHandlingConfigurer <H > exceptions = http .getConfigurer (ExceptionHandlingConfigurer .class );
188187 if (exceptions != null ) {
189188 AuthenticationEntryPoint forbidden = new Http403ForbiddenEntryPoint ();
190- exceptions .defaultDeniedHandlerForMissingAuthority (
191- (ep ) -> ep .addEntryPointFor (forbidden , AnyRequestMatcher .INSTANCE ),
189+ exceptions .defaultDeniedHandlerForMissingAuthority ((ep ) -> ep .defaultEntryPoint (forbidden ),
192190 GrantedAuthorities .FACTOR_X509_AUTHORITY );
193191 }
194192 }
You can’t perform that action at this time.
0 commit comments