Class BearerToken.AuthorizationHeaderAccessMethod
Thread-safe OAuth 2.0 method for accessing protected resources using the Authorization header as specified in http://tools.ietf.org/html/rfc6750#section-2.1.
Implements
Inherited Members
Namespace: Google.Apis.Auth.OAuth2
Assembly: Google.Apis.Auth.dll
Syntax
public class BearerToken.AuthorizationHeaderAccessMethod : IAccessMethod
Methods
GetAccessToken(HttpRequestMessage)
Retrieves the original access token in the HTTP request, as provided in the Intercept(HttpRequestMessage, string) method.
Declaration
public string GetAccessToken(HttpRequestMessage request)
Parameters
Type | Name | Description |
---|---|---|
HttpRequestMessage | request |
Returns
Type | Description |
---|---|
string |
Intercept(HttpRequestMessage, string)
Intercepts a HTTP request right before the HTTP request executes by providing the access token.
Declaration
public void Intercept(HttpRequestMessage request, string accessToken)
Parameters
Type | Name | Description |
---|---|---|
HttpRequestMessage | request | |
string | accessToken |