protected CommonProfile buildUserProfile ( final TokenCredentials tokenCredentials , final WebContext webContext , final AccessToken accessToken ) { val userProfile = new CommonProfile ( true ) ; val authentication = accessToken . getAuthentication ( ) ; val principal = authentication . getPrincipal ( ) ; userProfile . setId ( principal . getId ( ) ) ; val attributes = new HashMap < String , Object > ( principal . getAttributes ( ) ) ; attributes . putAll ( authentication . getAttributes ( ) ) ; userProfile . addAttributes ( attributes ) ; LOGGER . trace ( "Built user profile based on access token [{}] is [{}]" , accessToken , userProfile ) ; return userProfile ; }
Build user profile common profile .