public interface ITokenAccessWithHeaders : ITokenAccess
Allows direct retrieval of access tokens to authenticate requests.
The access tokens obtained can be accompanied by extra information
that either describes the access token or is associated with it.
This information should acompany the token as headers when the token
is used to access a resource.
Gets an access token to authorize a request.
The token might be accompanied by extra information that should be sent
in the form of headers.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document describes the \u003ccode\u003eITokenAccessWithHeaders\u003c/code\u003e interface, which allows for direct retrieval of access tokens along with associated header information for request authentication.\u003c/p\u003e\n"],["\u003cp\u003eThe primary method of this interface is \u003ccode\u003eGetAccessTokenWithHeadersForRequestAsync\u003c/code\u003e, which retrieves an access token and may include additional header information.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetAccessTokenWithHeadersForRequestAsync\u003c/code\u003e method accepts an \u003ccode\u003eauthUri\u003c/code\u003e parameter, indicating the URI the token will grant access to, and a \u003ccode\u003eCancellationToken\u003c/code\u003e for task cancellation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetAccessTokenWithHeadersForRequestAsync\u003c/code\u003e method returns an \u003ccode\u003eAccessTokenWithHeaders\u003c/code\u003e object, which contains both the token and any related headers.\u003c/p\u003e\n"],["\u003cp\u003eThis interface inherits members from \u003ccode\u003eITokenAccess\u003c/code\u003e, specifically \u003ccode\u003eGetAccessTokenForRequestAsync\u003c/code\u003e, and is part of the \u003ccode\u003eGoogle.Apis.Auth.OAuth2\u003c/code\u003e namespace within the \u003ccode\u003eGoogle.Apis.Auth.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"]]],[],null,[]]