3.7.0 (latest) 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.5.0 2.4.0 2.3.0 2.2.0

    public sealed class OidcToken : IMessage<OidcToken>, IEquatable<OidcToken>, IDeepCloneable<OidcToken>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Tasks v2 API class OidcToken.

Contains information needed for generating an
[OpenID Connect
token](https://developers.google.com/identity/protocols/OpenIDConnect).
This type of authorization can be used for many scenarios, including
calling Cloud Run, or endpoints where you intend to validate the token
yourself.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> OidcToken

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[OidcToken](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.OidcToken.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OidcToken](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.OidcToken.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[OidcToken](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.OidcToken.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Tasks.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.md.txt)

## Assembly

Google.Cloud.Tasks.V2.dll

## Constructors

### OidcToken()

    public OidcToken()

### OidcToken(OidcToken)

    public OidcToken(OidcToken other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `OidcToken` |

## Properties

### Audience

    public string Audience { get; set; }

Audience to be used when generating OIDC token. If not specified, the URI
specified in target will be used.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### ServiceAccountEmail

    public string ServiceAccountEmail { get; set; }

[Service account email](https://cloud.google.com/iam/docs/service-accounts)
to be used for generating OIDC token.
The service account must be within the same project as the queue. The
caller must have iam.serviceAccounts.actAs permission for the service
account.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |