Class FileSourcedExternalAccountCredential
File-sourced credentials as described in https://google.aip.dev/auth/4117#determining-the-subject-token-in-file-sourced-credentials.
Implements
Inherited Members
Namespace: Google.Apis.Auth.OAuth2
Assembly: Google.Apis.Auth.dll
Syntax
public sealed class FileSourcedExternalAccountCredential : 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.
Properties
SubjectTokenFilePath
The file path from which to obtain the subject token.
Declaration
public string SubjectTokenFilePath { get; }
Property Value
| Type | Description |
|---|---|
| string |
SubjectTokenJsonFieldName
If set, the subject token file content will be parsed as JSON and the value in the field with name SubjectTokenJsonFieldName will be returned as the subject token.
Declaration
public string SubjectTokenJsonFieldName { get; }
Property Value
| Type | Description |
|---|---|
| string |
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 |