com.google.api.client.auth.oauth2
Interface Credential.AccessMethod

Enclosing class:
Credential

public static interface Credential.AccessMethod

Method of presenting the access token to the resource server as specified in Accessing Protected Resources.


Method Summary
 String getAccessTokenFromRequest(HttpRequest request)
          Retrieve the original access token in the HTTP request, as provided in intercept(HttpRequest, String).
 void intercept(HttpRequest request, String accessToken)
          Intercept the HTTP request during Credential.intercept(HttpRequest) right before the HTTP request executes by providing the access token.
 

Method Detail

intercept

void intercept(HttpRequest request,
               String accessToken)
               throws IOException
Intercept the HTTP request during Credential.intercept(HttpRequest) right before the HTTP request executes by providing the access token.

Parameters:
request - HTTP request
accessToken - access token
Throws:
IOException

getAccessTokenFromRequest

String getAccessTokenFromRequest(HttpRequest request)
Retrieve the original access token in the HTTP request, as provided in intercept(HttpRequest, String).

Parameters:
request - HTTP request
Returns:
original access token or null for none


Copyright © 2011-2012 Google. All Rights Reserved.