public sealed class UrlSourcedExternalAccountCredential : ExternalAccountCredential, IHttpUnsuccessfulResponseHandler, ICredential, IConfigurableHttpClientInitializer, ITokenAccessWithHeaders, ITokenAccess, IHttpExecuteInterceptorURL-sourced credentials as described in https://google.aip.dev/auth/4117#determining-the-subject-token-in-microsoft-azure-and-url-sourced-credentials.
Inheritance
object > ServiceCredential > ExternalAccountCredential > UrlSourcedExternalAccountCredentialImplements
IHttpUnsuccessfulResponseHandler, ICredential, IConfigurableHttpClientInitializer, ITokenAccessWithHeaders, ITokenAccess, IHttpExecuteInterceptorNamespace
Google.Apis.Auth.OAuth2Assembly
Google.Apis.Auth.dll
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
Headers
public IReadOnlyDictionary<string, string> Headers { get; }Headers to include in the request for the subject token. May be empty. Will not be null.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyDictionarystringstring |
|
SubjectTokenJsonFieldName
public string SubjectTokenJsonFieldName { get; }If set, the subject token response will be parsed as JSON and the value in the field with name SubjectTokenJsonFieldName will be returned as the subject token.
| Property Value | |
|---|---|
| Type | Description |
string |
|
SubjectTokenUrl
public string SubjectTokenUrl { get; }The URL from which to obtain the subject token.
| Property Value | |
|---|---|
| Type | Description |
string |
|
Methods
GetSubjectTokenAsyncImpl(CancellationToken)
protected override Task<string> GetSubjectTokenAsyncImpl(CancellationToken taskCancellationToken)Gets the subject token to be exchanged for the access token.
| Parameter | |
|---|---|
| Name | Description |
taskCancellationToken |
CancellationToken |
| Returns | |
|---|---|
| Type | Description |
Taskstring |
|
ToGoogleCredential()
public GoogleCredential ToGoogleCredential()Creates a GoogleCredential from this credential.
| Returns | |
|---|---|
| Type | Description |
GoogleCredential |
|