Skip to content

In tutorial article, token services don't use the oAuth2RestTemplate #44

@LeaderOne

Description

@LeaderOne

In the guide, when a user is configuring the token services starting with "Manual Configuration of OAuth2 Client", the token services get set like this:

private Filter ssoFilter() { OAuth2ClientAuthenticationProcessingFilter facebookFilter = new OAuth2ClientAuthenticationProcessingFilter("/login/facebook"); OAuth2RestTemplate facebookTemplate = new OAuth2RestTemplate(facebook(), oauth2ClientContext); facebookFilter.setRestTemplate(facebookTemplate); facebookFilter.setTokenServices(new UserInfoTokenServices(facebookResource().getUserInfoUri(), facebook().getClientId())); return facebookFilter; } 

This method of setting the token services doesn't use the OAuth2RestTemplate that you just created. Although Facebook and GitHub may not require it, it might be a good idea to put a blurb in there about what that means, or change the guide to set the RestTemplate explicitly. The code checked out from GitHub does use the template in some examples, which is different than the guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions