public void setPrincipalExtractor(PrincipalExtractor principalExtractor) { Assert.notNull(principalExtractor, "PrincipalExtractor must not be null"); this.principalExtractor = principalExtractor; }
@Bean public PrincipalExtractor principalExtractor(OAuth2RestOperations template) { return map -> { return map.get("preferred_username"); }; }
@Bean public PrincipalExtractor principalExtractor(final OAuth2RestOperations template) { return map -> { return map.get("preferred_username"); }; }
public CustomUserInfoTokenServices(String userInfoEndpointUrl, String clientId, PrincipalExtractor principalExtractor) { super(userInfoEndpointUrl, clientId); setPrincipalExtractor(principalExtractor); }
@Bean public PrincipalExtractor userDetailPrincipalExtractor(){ return new UserDetailPrincipalExtractor(); }