org.springframework.security.oauth2.client.token
Interface ClientTokenServices

All Known Implementing Classes:
JdbcClientTokenServices

public interface ClientTokenServices

Author:
Dave Syer

Method Summary
 OAuth2AccessToken getAccessToken(OAuth2ProtectedResourceDetails resource, org.springframework.security.core.Authentication authentication)
          Retrieve the access token for a given resource and user authentication (my be null).
 void removeAccessToken(OAuth2ProtectedResourceDetails resource, org.springframework.security.core.Authentication authentication)
          Remove the token (if any) that is stored with the provided resource and authentication.
 void saveAccessToken(OAuth2ProtectedResourceDetails resource, org.springframework.security.core.Authentication authentication, OAuth2AccessToken accessToken)
          Save or update the access token for this resource and authentication (may be null).
 

Method Detail

getAccessToken

OAuth2AccessToken getAccessToken(OAuth2ProtectedResourceDetails resource,
                                 org.springframework.security.core.Authentication authentication)
Retrieve the access token for a given resource and user authentication (my be null).

Parameters:
resource - the resource to be accessed
authentication - the current user authentication (or null if there is none)
Returns:
an access token if one has been stored, null otherwise

saveAccessToken

void saveAccessToken(OAuth2ProtectedResourceDetails resource,
                     org.springframework.security.core.Authentication authentication,
                     OAuth2AccessToken accessToken)
Save or update the access token for this resource and authentication (may be null).

Parameters:
resource - the resource to be accessed
authentication - the current user authentication (or null if there is none)
accessToken - an access token to be stored

removeAccessToken

void removeAccessToken(OAuth2ProtectedResourceDetails resource,
                       org.springframework.security.core.Authentication authentication)
Remove the token (if any) that is stored with the provided resource and authentication. If there is no such token do nothing.

Parameters:
resource - the resource to be accessed
authentication - the current user authentication (or null if there is none)


Copyright © 2012. All Rights Reserved.