Google API Client Library for .NET  1.10.0
Public Member Functions | List of all members
Google.Apis.Auth.OAuth2.ITokenAccess Interface Reference

Allows direct retrieval of access tokens to authenticate requests. This is necessary for workflows where you don't want to use T:Google.Apis.Services.BaseClientService to access the API. (e.g. gRPC that implemenents the entire HTTP2 stack internally). More...

Inheritance diagram for Google.Apis.Auth.OAuth2.ITokenAccess:
Google.Apis.Auth.OAuth2.GoogleCredential Google.Apis.Auth.OAuth2.ICredential Google.Apis.Auth.OAuth2.ServiceCredential Google.Apis.Auth.OAuth2.UserCredential Google.Apis.Auth.OAuth2.ComputeCredential Google.Apis.Auth.OAuth2.ServiceAccountCredential

Public Member Functions

Task< string > GetAccessTokenForRequestAsync (string authUri=null, CancellationToken cancellationToken=default(CancellationToken))
 Gets an access token to authorize a request. Implementations should handle automatic refreshes of the token if they are supported. The authUri might be required by some credential types (e.g. the JWT access token) while other credential types migth just ignore it. More...
 

Detailed Description

Allows direct retrieval of access tokens to authenticate requests. This is necessary for workflows where you don't want to use T:Google.Apis.Services.BaseClientService to access the API. (e.g. gRPC that implemenents the entire HTTP2 stack internally).

Member Function Documentation

Task<string> Google.Apis.Auth.OAuth2.ITokenAccess.GetAccessTokenForRequestAsync ( string  authUri = null,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Gets an access token to authorize a request. Implementations should handle automatic refreshes of the token if they are supported. The authUri might be required by some credential types (e.g. the JWT access token) while other credential types migth just ignore it.

Parameters
authUriThe URI the returned token will grant access to.
cancellationTokenThe cancellation token.
Returns
The access token.

Implemented in Google.Apis.Auth.OAuth2.ServiceCredential, Google.Apis.Auth.OAuth2.ServiceAccountCredential, and Google.Apis.Auth.OAuth2.UserCredential.


The documentation for this interface was generated from the following file: