Class ProgrammaticExternalAccountCredential
External account credentials that rely on user-provided code to obtain the third-party token.
Inheritance
ProgrammaticExternalAccountCredential
Implements
IHttpUnsuccessfulResponseHandler
IConfigurableHttpClientInitializer
IHttpExecuteInterceptor
Inherited Members
Namespace: Google.Apis.Auth.OAuth2
Assembly: Google.Apis.Auth.dll
Syntax
public sealed class ProgrammaticExternalAccountCredential : ExternalAccountCredential, IHttpUnsuccessfulResponseHandler, ICredential, IConfigurableHttpClientInitializer, ITokenAccessWithHeaders, ITokenAccess, IHttpExecuteInterceptor
Remarks
This credential type does not validate the credential configuration. A security risk occurs when a credential configuration configured with malicious urls is used. You should validate credential configurations provided by untrusted sources. See Security requirements when using credential configurations from an external source for more details.
Constructors
ProgrammaticExternalAccountCredential(Initializer)
Builds a ProgrammaticExternalAccountCredential instace from the given initializer.
Declaration
public ProgrammaticExternalAccountCredential(ProgrammaticExternalAccountCredential.Initializer initializer)
Parameters
| Type | Name | Description |
|---|---|---|
| ProgrammaticExternalAccountCredential.Initializer | initializer |
Properties
SubjectTokenProvider
The provider of the third-party token that's included on the STS token exchange request. Will not be null.
Declaration
public ProgrammaticExternalAccountCredential.ISubjectTokenProvider SubjectTokenProvider { get; }
Property Value
| Type | Description |
|---|---|
| ProgrammaticExternalAccountCredential.ISubjectTokenProvider |
Methods
GetSubjectTokenAsyncImpl(CancellationToken)
Gets the subject token to be exchanged for the access token.
Declaration
protected override Task<string> GetSubjectTokenAsyncImpl(CancellationToken taskCancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | taskCancellationToken |
Returns
| Type | Description |
|---|---|
| Task<string> |
Overrides
ToGoogleCredential()
Creates a GoogleCredential from this credential.
Declaration
public GoogleCredential ToGoogleCredential()
Returns
| Type | Description |
|---|---|
| GoogleCredential |
Implements
Google.Apis.Http.IHttpUnsuccessfulResponseHandler
Google.Apis.Http.IConfigurableHttpClientInitializer
Google.Apis.Http.IHttpExecuteInterceptor