Send feedback
Interface ITokenAccess (1.60.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.60.0 keyboard_arrow_down
public interface ITokenAccess
Allows direct retrieval of access tokens to authenticate requests.
This is necessary for workflows where you don't want to use
BaseClientService to access the API.
(e.g. gRPC that implemenents the entire HTTP2 stack internally).
Namespace
Google Apis Auth OAuth2
Assembly
Google.Apis.Auth.dll
Methods
GetAccessTokenForRequestAsync(string, CancellationToken)
Task<string> GetAccessTokenForRequestAsync(string authUri = null, CancellationToken cancellationToken = default)
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
Name
Description
authUri
string
The URI the returned token will grant access to.
cancellationToken
CancellationToken
The cancellation token.
Returns
Type
Description
Task string
The access token.
Extension Method
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-10 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-10 UTC."}