Class OidcTokenOptions
Options used to create an OidcToken.
Inherited Members
Namespace: Google.Apis.Auth.OAuth2
Assembly: Google.Apis.Auth.dll
Syntax
public class OidcTokenOptions
Properties
TargetAudience
The target audience the generated token should be valid for. Must not be null.
Declaration
public string TargetAudience { get; }
Property Value
Type | Description |
---|---|
string |
TokenFormat
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.
Declaration
public OidcTokenFormat TokenFormat { get; }
Property Value
Type | Description |
---|---|
OidcTokenFormat |
Methods
FromTargetAudience(string)
Builds new OidcTokenOptions from the given target audience.
Declaration
public static OidcTokenOptions FromTargetAudience(string targetAudience)
Parameters
Type | Name | Description |
---|---|---|
string | targetAudience | 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)
Builds a new set of options with the same options as this one, except for the target audience.
Declaration
public OidcTokenOptions WithTargetAudience(string targetAudience)
Parameters
Type | Name | Description |
---|---|---|
string | targetAudience | The new target audience. Must not be null. |
Returns
Type | Description |
---|---|
OidcTokenOptions | A new set of options with the given target audience. |
WithTokenFormat(OidcTokenFormat)
Builds a new set of options with the same options as this one, except for the token format.
Declaration
public OidcTokenOptions WithTokenFormat(OidcTokenFormat tokenFormat)
Parameters
Type | Name | Description |
---|---|---|
OidcTokenFormat | tokenFormat | The new token format. |
Returns
Type | Description |
---|---|
OidcTokenOptions | A new set of options with the given token format. |