Class BearerToken.AuthorizationHeaderAccessMethod (1.60.0)

public class BearerToken.AuthorizationHeaderAccessMethod : IAccessMethod

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.

Inheritance

object > BearerToken.AuthorizationHeaderAccessMethod

Implements

IAccessMethod

Namespace

GoogleApisAuthOAuth2

Assembly

Google.Apis.Auth.dll

Methods

GetAccessToken(HttpRequestMessage)

public string GetAccessToken(HttpRequestMessage request)

Retrieves the original access token in the HTTP request, as provided in the Intercept(HttpRequestMessage, string) method.

Parameter
Name Description
request HttpRequestMessage
Returns
Type Description
string

Intercept(HttpRequestMessage, string)

public void Intercept(HttpRequestMessage request, string accessToken)

Intercepts a HTTP request right before the HTTP request executes by providing the access token.

Parameters
Name Description
request HttpRequestMessage
accessToken string

Extension Method