Interface Credential.AccessMethod
-
- Enclosing class:
- Credential
public static interface Credential.AccessMethodMethod of presenting the access token to the resource server as specified in Accessing Protected Resources.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetAccessTokenFromRequest(com.google.api.client.http.HttpRequest request)Retrieve the original access token in the HTTP request, as provided inintercept(HttpRequest, String).voidintercept(com.google.api.client.http.HttpRequest request, String accessToken)Intercept the HTTP request duringCredential.intercept(HttpRequest)right before the HTTP request executes by providing the access token.
-
-
-
Method Detail
-
intercept
void intercept(com.google.api.client.http.HttpRequest request, String accessToken) throws IOExceptionIntercept the HTTP request duringCredential.intercept(HttpRequest)right before the HTTP request executes by providing the access token.- Parameters:
request- HTTP requestaccessToken- access token- Throws:
IOException
-
getAccessTokenFromRequest
String getAccessTokenFromRequest(com.google.api.client.http.HttpRequest request)
Retrieve the original access token in the HTTP request, as provided inintercept(HttpRequest, String).- Parameters:
request- HTTP request- Returns:
- original access token or
nullfor none
-
-