File tree Expand file tree Collapse file tree
gateway-oauth2-login/auth-server/src/main/java/com/relive/config
oauth2-custom-consent-page-with-vue/openid-provider/src/main/java/com/relive/config
oidc-login/idp/src/main/java/com/relive/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
6060 .authorizeHttpRequests ((authorizeRequests ) ->
6161 authorizeRequests .anyRequest ().authenticated ()
6262 ).csrf ((csrf ) -> {
63- csrf .ignoringRequestMatchers (new RequestMatcher []{ endpointsMatcher } );
63+ csrf .ignoringRequestMatchers (endpointsMatcher );
6464 }).apply (authorizationServerConfigurer )
6565 .and ()
6666 .oauth2ResourceServer (OAuth2ResourceServerConfigurer ::jwt )
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ ClientRegistrationRepository clientRegistrationRepository(JdbcTemplate jdbcTempl
9494 .clientAuthenticationMethod (ClientAuthenticationMethod .CLIENT_SECRET_BASIC )
9595 .authorizationGrantType (AuthorizationGrantType .AUTHORIZATION_CODE )
9696 .redirectUri ("{baseUrl}/{action}/oauth2/code/{registrationId}" )
97- .scope (new String []{ "read:user" } )
97+ .scope ("read:user" )
9898 .authorizationUri ("https://github.com/login/oauth/authorize" )
9999 .tokenUri ("https://github.com/login/oauth/access_token" )
100100 .userInfoUri ("https://api.github.com/user" )
Original file line number Diff line number Diff line change 3232import org .springframework .security .oauth2 .server .authorization .settings .TokenSettings ;
3333import org .springframework .security .oauth2 .server .resource .authentication .JwtAuthenticationProvider ;
3434import org .springframework .security .oauth2 .server .resource .authentication .JwtAuthenticationToken ;
35- import org .springframework .security .oauth2 .server .resource .web .BearerTokenAuthenticationFilter ;
35+ import org .springframework .security .oauth2 .server .resource .web .authentication . BearerTokenAuthenticationFilter ;
3636import org .springframework .security .web .SecurityFilterChain ;
3737import org .springframework .security .web .authentication .preauth .AbstractPreAuthenticatedProcessingFilter ;
3838import org .springframework .security .web .util .matcher .RequestMatcher ;
@@ -82,7 +82,7 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
8282 return http .securityMatcher (endpointsMatcher ).authorizeHttpRequests ((authorizeRequests ) ->
8383 authorizeRequests .anyRequest ().authenticated ()
8484 ).csrf ((csrf ) -> {
85- csrf .ignoringRequestMatchers (new RequestMatcher []{ endpointsMatcher } );
85+ csrf .ignoringRequestMatchers (endpointsMatcher );
8686 }).apply (authorizationServerConfigurer )
8787 .and ()
8888 .addFilterBefore (new BearerTokenAuthenticationFilter (
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity h
7070 return http .securityMatcher (endpointsMatcher ).authorizeHttpRequests ((authorizeRequests ) ->
7171 authorizeRequests .anyRequest ().authenticated ()
7272 ).csrf ((csrf ) -> {
73- csrf .ignoringRequestMatchers (new RequestMatcher []{ endpointsMatcher } );
73+ csrf .ignoringRequestMatchers (endpointsMatcher );
7474 }).apply (authorizationServerConfigurer )
7575 .and ()
7676 .oauth2ResourceServer (OAuth2ResourceServerConfigurer ::jwt )
You can’t perform that action at this time.
0 commit comments