File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
github/src/main/java/com/example Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -144,14 +144,16 @@ private Filter ssoFilter() {
144144}
145145
146146private Filter ssoFilter (ClientResources client , String path ) {
147- OAuth2ClientAuthenticationProcessingFilter facebookFilter = new OAuth2ClientAuthenticationProcessingFilter (
148- path );
149- OAuth2RestTemplate facebookTemplate = new OAuth2RestTemplate (client .getClient (),
147+ OAuth2ClientAuthenticationProcessingFilter oAuth2ClientAuthenticationFilter =
148+ new OAuth2ClientAuthenticationProcessingFilter ( path );
149+ OAuth2RestTemplate oAuth2RestTemplate = new OAuth2RestTemplate (client .getClient (),
150150oauth2ClientContext );
151- facebookFilter .setRestTemplate (facebookTemplate );
152- facebookFilter .setTokenServices (new UserInfoTokenServices (
153- client .getResource ().getUserInfoUri (), client .getClient ().getClientId ()));
154- return facebookFilter ;
151+ oAuth2ClientAuthenticationFilter .setRestTemplate (oAuth2RestTemplate );
152+ UserInfoTokenServices tokenServices = new UserInfoTokenServices (
153+ client .getResource ().getUserInfoUri (), client .getClient ().getClientId ());
154+ tokenServices .setRestTemplate (oAuth2RestTemplate );
155+ oAuth2ClientAuthenticationFilter .setTokenServices (tokenServices );
156+ return oAuth2ClientAuthenticationFilter ;
155157}
156158
157159private Filter csrfHeaderFilter () {
You can’t perform that action at this time.
0 commit comments