org.springframework.security.oauth.consumer.token
Class HttpSessionBasedTokenServices
java.lang.Object
org.springframework.security.oauth.consumer.token.HttpSessionBasedTokenServices
- All Implemented Interfaces:
- OAuthConsumerTokenServices
public class HttpSessionBasedTokenServices
- extends Object
- implements OAuthConsumerTokenServices
Stores the tokens in an HTTP session.
- Author:
- Ryan Heaton
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_PREFIX
public static final String KEY_PREFIX
- See Also:
- Constant Field Values
HttpSessionBasedTokenServices
public HttpSessionBasedTokenServices()
getToken
public OAuthConsumerToken getToken(String resourceId)
throws org.springframework.security.core.AuthenticationException
- Description copied from interface:
OAuthConsumerTokenServices
- Get the token for the specified protected resource.
- Specified by:
getToken in interface OAuthConsumerTokenServices
- Parameters:
resourceId - The id of the protected resource.
- Returns:
- The token, or null if none was found.
- Throws:
org.springframework.security.core.AuthenticationException
storeToken
public void storeToken(String resourceId,
OAuthConsumerToken token)
- Description copied from interface:
OAuthConsumerTokenServices
- Store a token for a specified resource. If the token
is not an access token,
the token services may not have to store it and instead rely on the implementation of the
remember-me services.
- Specified by:
storeToken in interface OAuthConsumerTokenServices
- Parameters:
resourceId - The id of the protected resource.token - The token to store.
removeToken
public void removeToken(String resourceId)
- Description copied from interface:
OAuthConsumerTokenServices
- Removes the token for the specified resource.
- Specified by:
removeToken in interface OAuthConsumerTokenServices
- Parameters:
resourceId - The id of the resource.
getSession
protected javax.servlet.http.HttpSession getSession()
Copyright © 2013. All rights reserved.