org.apache.shindig.social.core.oauth2
Interface OAuth2DataService

All Known Implementing Classes:
OAuth2DataServiceImpl

public interface OAuth2DataService

Services to support the management of data for the OAuth 2.0 specification. Includes management of clients, authorization codes, access tokens, and refresh tokens. TODO (Eric): client registration services


Method Summary
 OAuth2Code getAccessToken(java.lang.String accessToken)
          Retrieves an access token by its value.
 OAuth2Code getAuthorizationCode(java.lang.String clientId, java.lang.String authCode)
          Retrieves an authorization code by its value.
 OAuth2Client getClient(java.lang.String clientId)
          Retrieves a pre-registered client by ID.
 OAuth2Code getRefreshToken(java.lang.String refreshToken)
          Retrieves a refresh token by its value.
 void registerAccessToken(java.lang.String clientId, OAuth2Code accessToken)
          Registers an access token with a client.
 void registerAuthorizationCode(java.lang.String clientId, OAuth2Code authCode)
          Registers an authorization code with a client.
 void registerRefreshToken(java.lang.String clientId, OAuth2Code refreshToken)
          Registers a refresh token with a client.
 void unregisterAccessToken(java.lang.String clientId, java.lang.String accessToken)
          Unregisters an access token with a client.
 void unregisterAuthorizationCode(java.lang.String clientId, java.lang.String authCode)
          Unregisters an authorization code with a client.
 void unregisterRefreshToken(java.lang.String clientId, java.lang.String refreshToken)
          Unregisters a refresh token with a client.
 

Method Detail

getClient

OAuth2Client getClient(java.lang.String clientId)
Retrieves a pre-registered client by ID.

Parameters:
clientId - identifies the client to retrieve
OAuth2Client - is the retrieved client

getAuthorizationCode

OAuth2Code getAuthorizationCode(java.lang.String clientId,
                                java.lang.String authCode)
Retrieves an authorization code by its value.

Parameters:
clientId - identifies the client who owns the authorization code
authCode - is the value of the authorization code to get
Returns:
OAuth2Code is the retrieved authorization code

registerAuthorizationCode

void registerAuthorizationCode(java.lang.String clientId,
                               OAuth2Code authCode)
Registers an authorization code with a client.

Parameters:
clientId - identifies the client who owns the authorization code
authCode - is the authorization code to register with the client

unregisterAuthorizationCode

void unregisterAuthorizationCode(java.lang.String clientId,
                                 java.lang.String authCode)
Unregisters an authorization code with a client.

Parameters:
clientId - identifies the client who owns the authorization code
authCode - is the value of the authorization code to unregister

getAccessToken

OAuth2Code getAccessToken(java.lang.String accessToken)
Retrieves an access token by its value.

Parameters:
accessToken - is the value of the accessToken to retrieve
Returns:
OAuth2Code is the retrieved access token; null if not found

registerAccessToken

void registerAccessToken(java.lang.String clientId,
                         OAuth2Code accessToken)
Registers an access token with a client.

Parameters:
clientId - identifies the client to register the access token with
accessToken - is the access token to register with the client

unregisterAccessToken

void unregisterAccessToken(java.lang.String clientId,
                           java.lang.String accessToken)
Unregisters an access token with a client.

Parameters:
clientId - identifies the client who owns the access token
accessToken - is the value of the access token to unregister

getRefreshToken

OAuth2Code getRefreshToken(java.lang.String refreshToken)
Retrieves a refresh token by its value.

Parameters:
refreshToken - is the value of the refresh token to retrieve
Returns:
OAuth2Code is the retrieved refresh token; null if not found

registerRefreshToken

void registerRefreshToken(java.lang.String clientId,
                          OAuth2Code refreshToken)
Registers a refresh token with a client.

Parameters:
clientId - identifies the client who owns the refresh token
refreshToken - is the refresh token to register with the client

unregisterRefreshToken

void unregisterRefreshToken(java.lang.String clientId,
                            java.lang.String refreshToken)
Unregisters a refresh token with a client.

Parameters:
clientId - identifies the client who owns the refresh token
refreshToken - is the value of the refresh token to unregister


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.