Show / Hide Table of Contents

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.

Inheritance
System.Object
BearerToken.AuthorizationHeaderAccessMethod
Implements
IAccessMethod
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.Auth.OAuth2
Assembly: Google.Apis.Auth.dll
Syntax
public class 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
System.Net.Http.HttpRequestMessage request
Returns
Type Description
System.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
System.Net.Http.HttpRequestMessage request
System.String accessToken

Implements

IAccessMethod
Back to top