org.springframework.security.oauth2.provider.token
Class DefaultAccessTokenConverter
java.lang.Object
org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter
- All Implemented Interfaces:
- AccessTokenConverter
public class DefaultAccessTokenConverter
- extends Object
- implements AccessTokenConverter
Default implementation of AccessTokenConverter.
- Author:
- Dave Syer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultAccessTokenConverter
public DefaultAccessTokenConverter()
convertAccessToken
public Map<String,?> convertAccessToken(OAuth2AccessToken token,
OAuth2Authentication authentication)
- Specified by:
convertAccessToken in interface AccessTokenConverter
- Parameters:
token - an access tokenauthentication - the current OAuth authentication
- Returns:
- a map representation of the token suitable for a JSON response
extractAccessToken
public OAuth2AccessToken extractAccessToken(String value,
Map<String,?> map)
- Description copied from interface:
AccessTokenConverter
- Recover an access token from the converted value. Half the inverse of
AccessTokenConverter.convertAccessToken(OAuth2AccessToken, OAuth2Authentication).
- Specified by:
extractAccessToken in interface AccessTokenConverter
- Parameters:
value - the token valuemap - information decoded from an access token
- Returns:
- an access token
extractAuthentication
public OAuth2Authentication extractAuthentication(Map<String,?> map)
- Description copied from interface:
AccessTokenConverter
- Recover an
OAuth2Authentication from the converted access token. Half the inverse of
AccessTokenConverter.convertAccessToken(OAuth2AccessToken, OAuth2Authentication).
- Specified by:
extractAuthentication in interface AccessTokenConverter
- Parameters:
map - information decoded from an access token
- Returns:
- an authentication representing the client and user (if there is one)
Copyright © 2013. All rights reserved.