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
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