public sealed class OidcToken : IMessage<OidcToken>, IEquatable<OidcToken>, IDeepCloneable<OidcToken>, IBufferMessage, IMessage
Contains information needed for generating an
OpenID Connect
token.
This type of authorization can be used for many scenarios, including
calling Cloud Run, or endpoints where you intend to validate the token
yourself.
Service account email
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.
[[["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 webpage details the \u003ccode\u003eOidcToken\u003c/code\u003e class within the \u003ccode\u003eGoogle.Cloud.Tasks.V2\u003c/code\u003e namespace, providing information for generating OpenID Connect tokens.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOidcToken\u003c/code\u003e class can be implemented in various authorization scenarios, including calling Cloud Run or validating tokens yourself, and it inherits from the \u003ccode\u003eObject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe class has a default constructor, and one that takes another \u003ccode\u003eOidcToken\u003c/code\u003e object as a parameter to copy it.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOidcToken\u003c/code\u003e class includes two properties: \u003ccode\u003eAudience\u003c/code\u003e, which specifies the target audience for the token, and \u003ccode\u003eServiceAccountEmail\u003c/code\u003e, which defines the service account used to generate the token.\u003c/p\u003e\n"],["\u003cp\u003eThe page contains links to other versions of the \u003ccode\u003eOidcToken\u003c/code\u003e class, ranging from version \u003ccode\u003e2.2.0\u003c/code\u003e to the latest version \u003ccode\u003e3.5.0\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]