public class HttpSessionBasedTokenServices extends Object implements OAuthConsumerTokenServices
Modifier and Type | Field and Description |
---|---|
static String |
KEY_PREFIX |
Constructor and Description |
---|
HttpSessionBasedTokenServices() |
Modifier and Type | Method and Description |
---|---|
protected javax.servlet.http.HttpSession |
getSession() |
OAuthConsumerToken |
getToken(String resourceId)
Get the token for the specified protected resource.
|
void |
removeToken(String resourceId)
Removes the token for the specified resource.
|
void |
storeToken(String resourceId,
OAuthConsumerToken token)
Store a token for a specified resource.
|
public static final String KEY_PREFIX
public OAuthConsumerToken getToken(String resourceId) throws org.springframework.security.core.AuthenticationException
OAuthConsumerTokenServices
getToken
in interface OAuthConsumerTokenServices
resourceId
- The id of the protected resource.org.springframework.security.core.AuthenticationException
public void storeToken(String resourceId, OAuthConsumerToken token)
OAuthConsumerTokenServices
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
.storeToken
in interface OAuthConsumerTokenServices
resourceId
- The id of the protected resource.token
- The token to store.public void removeToken(String resourceId)
OAuthConsumerTokenServices
removeToken
in interface OAuthConsumerTokenServices
resourceId
- The id of the resource.protected javax.servlet.http.HttpSession getSession()
Copyright © 2019. All rights reserved.