Java源码示例:org.springframework.security.oauth2.provider.authentication.BearerTokenExtractor

示例1
@Override
public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
    resources.tokenExtractor(new PoPTokenExtractor(new BearerTokenExtractor()));
    OAuth2AuthenticationManager oauth = new OAuth2AuthenticationManager();
    oauth.setTokenServices(tokenServices());
    resources.authenticationManager(new PoPAuthenticationManager(oauth));
}