Class OidcTokenOptions (1.60.0)

public class OidcTokenOptions

Options used to create an OidcToken.

Inheritance

object > OidcTokenOptions

Namespace

GoogleApisAuthOAuth2

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
Type Description
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
Type Description
OidcTokenFormat

Methods

FromTargetAudience(string)

public static OidcTokenOptions FromTargetAudience(string targetAudience)

Builds new OidcTokenOptions from the given target audience.

Parameter
Name Description
targetAudience string

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

Returns
Type Description
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
Name Description
targetAudience string

The new target audience. Must not be null.

Returns
Type Description
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
Name Description
tokenFormat OidcTokenFormat

The new token format.

Returns
Type Description
OidcTokenOptions

A new set of options with the given token format.

Extension Method