org.springframework.security.oauth.consumer.token
Class HttpSessionBasedTokenServices

java.lang.Object
  extended by org.springframework.security.oauth.consumer.token.HttpSessionBasedTokenServices
All Implemented Interfaces:
OAuthConsumerTokenServices

public class HttpSessionBasedTokenServices
extends java.lang.Object
implements OAuthConsumerTokenServices

Stores the tokens in an HTTP session.

Author:
Ryan Heaton

Field Summary
static java.lang.String KEY_PREFIX
           
 
Constructor Summary
HttpSessionBasedTokenServices(javax.servlet.http.HttpSession session)
           
 
Method Summary
 OAuthConsumerToken getToken(java.lang.String resourceId)
          Get the token for the specified protected resource.
 void storeToken(java.lang.String resourceId, OAuthConsumerToken token)
          Store a token for a specified resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_PREFIX

public static final java.lang.String KEY_PREFIX
See Also:
Constant Field Values
Constructor Detail

HttpSessionBasedTokenServices

public HttpSessionBasedTokenServices(javax.servlet.http.HttpSession session)
Method Detail

getToken

public OAuthConsumerToken getToken(java.lang.String resourceId)
                            throws org.springframework.security.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.AuthenticationException

storeToken

public void storeToken(java.lang.String resourceId,
                       OAuthConsumerToken token)
Description copied from interface: OAuthConsumerTokenServices
Store a token for a specified resource.

Specified by:
storeToken in interface OAuthConsumerTokenServices
Parameters:
resourceId - The id of the protected resource.
token - The token to store.


Copyright © 2008. All Rights Reserved.