Class OidcTokenOptions (1.59.0)

public class OidcTokenOptions

Options used to create an OidcToken.

Inheritance

Object > OidcTokenOptions

Namespace

Google.Apis.Auth.OAuth2

Assembly

Google.Apis.Auth.dll

Properties

TargetAudience

public string TargetAudience { get; }

The target audience the generated token should be valid for. Must not be null.

Property Value
TypeDescription
String

TokenFormat

public OidcTokenFormat TokenFormat { get; }

The token format of the expected OIDC token when obtained from the GCE metadata server. This value will be ignored when the token provider is other then the GCE metadata server. OidcTokenFormat for the meaning of each value. Defaults to Full.

Property Value
TypeDescription
OidcTokenFormat

Methods

FromTargetAudience(String)

public static OidcTokenOptions FromTargetAudience(string targetAudience)

Builds new OidcTokenOptions from the given target audience.

Parameter
NameDescription
targetAudienceString

The target audience to build these options from. Must no be null.

Returns
TypeDescription
OidcTokenOptions

A new set of options that can be used with a IOidcTokenProvider to obtain an OidcToken.

WithTargetAudience(String)

public OidcTokenOptions WithTargetAudience(string targetAudience)

Builds a new set of options with the same options as this one, except for the target audience.

Parameter
NameDescription
targetAudienceString

The new target audience. Must not be null.

Returns
TypeDescription
OidcTokenOptions

A new set of options with the given target audience.

WithTokenFormat(OidcTokenFormat)

public OidcTokenOptions WithTokenFormat(OidcTokenFormat tokenFormat)

Builds a new set of options with the same options as this one, except for the token format.

Parameter
NameDescription
tokenFormatOidcTokenFormat

The new token format.

Returns
TypeDescription
OidcTokenOptions

A new set of options with the given token format.

Extension Method