org.springframework.security.oauth2.provider.token
Interface UserAuthenticationConverter

All Known Implementing Classes:
DefaultUserAuthenticationConverter

public interface UserAuthenticationConverter

Utility interface for converting a user authentication to and from a Map.

Author:
Dave Syer

Method Summary
 Map<String,?> convertUserAuthentication(org.springframework.security.core.Authentication userAuthentication)
          Extract information about the user to be used in an access token (i.e.
 org.springframework.security.core.Authentication extractAuthentication(Map<String,?> map)
          Inverse of convertUserAuthentication(Authentication).
 

Method Detail

convertUserAuthentication

Map<String,?> convertUserAuthentication(org.springframework.security.core.Authentication userAuthentication)
Extract information about the user to be used in an access token (i.e. for resource servers).

Parameters:
userAuthentication - an authentication representing a user
Returns:
a map of key values representing the unique information about the user

extractAuthentication

org.springframework.security.core.Authentication extractAuthentication(Map<String,?> map)
Inverse of convertUserAuthentication(Authentication). Extracts an Authentication from a map.

Parameters:
map - a map of user information
Returns:
an Authentication representing the user or null if there is none


Copyright © 2013. All rights reserved.