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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getAccessTokenFromRequest(com.google.api.client.http.HttpRequest request)
Retrieve the original access token in the HTTP request, as provided inintercept(HttpRequest, String)
.void
intercept(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 IOException
Intercept 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
null
for none
-
-