Class ProviderCredentialTokenGrant
- Namespace
- Openshell.V1
- Assembly
- OpenShell.Sdk.dll
public sealed class ProviderCredentialTokenGrant : IMessage<ProviderCredentialTokenGrant>, IEquatable<ProviderCredentialTokenGrant>, IDeepCloneable<ProviderCredentialTokenGrant>, IBufferMessage, IMessage
- Inheritance
-
ProviderCredentialTokenGrant
- Implements
-
IMessage<ProviderCredentialTokenGrant>IDeepCloneable<ProviderCredentialTokenGrant>IBufferMessageIMessage
- Inherited Members
Constructors
ProviderCredentialTokenGrant()
public ProviderCredentialTokenGrant()
ProviderCredentialTokenGrant(ProviderCredentialTokenGrant)
public ProviderCredentialTokenGrant(ProviderCredentialTokenGrant other)
Parameters
Fields
AudienceFieldNumber
Field number for the "audience" field.
public const int AudienceFieldNumber = 2
Field Value
AudienceOverridesFieldNumber
Field number for the "audience_overrides" field.
public const int AudienceOverridesFieldNumber = 5
Field Value
CacheTtlFieldNumber
Field number for the "cache_ttl" field.
public const int CacheTtlFieldNumber = 104
Field Value
ClientAssertionTypeFieldNumber
Field number for the "client_assertion_type" field.
public const int ClientAssertionTypeFieldNumber = 7
Field Value
GrantTypeFieldNumber
Field number for the "grant_type" field.
public const int GrantTypeFieldNumber = 8
Field Value
JwtSvidAudienceFieldNumber
Field number for the "jwt_svid_audience" field.
public const int JwtSvidAudienceFieldNumber = 6
Field Value
RequestedTokenTypeFieldNumber
Field number for the "requested_token_type" field.
public const int RequestedTokenTypeFieldNumber = 10
Field Value
ScopesFieldNumber
Field number for the "scopes" field.
public const int ScopesFieldNumber = 3
Field Value
SubjectTokenFieldNumber
Field number for the "subject_token" field.
public const int SubjectTokenFieldNumber = 9
Field Value
TokenEndpointFieldNumber
Field number for the "token_endpoint" field.
public const int TokenEndpointFieldNumber = 1
Field Value
Properties
Audience
Optional: default resource audience to request from the token service
public string Audience { get; set; }
Property Value
AudienceOverrides
Optional: endpoint-specific resource audience overrides.
public RepeatedField<ProviderCredentialTokenGrantAudienceOverride> AudienceOverrides { get; }
Property Value
- RepeatedField<ProviderCredentialTokenGrantAudienceOverride>
CacheTtl
Optional token cache TTL override. If absent, use expires_in from the token response.
public Duration CacheTtl { get; set; }
Property Value
- Duration
ClientAssertionType
Optional: OAuth2 client_assertion_type value. If omitted, OpenShell uses urn:ietf:params:oauth:client-assertion-type:jwt-bearer.
public string ClientAssertionType { get; set; }
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
GrantType
Grant type. If omitted/unspecified, OpenShell treats this as client_credentials for backwards compatibility.
public ProviderCredentialTokenGrantType GrantType { get; set; }
Property Value
JwtSvidAudience
Optional: audience to request when fetching the JWT-SVID from SPIRE. If omitted, the sandbox derives this from token_endpoint.
public string JwtSvidAudience { get; set; }
Property Value
Parser
public static MessageParser<ProviderCredentialTokenGrant> Parser { get; }
Property Value
- MessageParser<ProviderCredentialTokenGrant>
RequestedTokenType
OAuth2 requested_token_type. If omitted for token_exchange, OpenShell uses urn:ietf:params:oauth:token-type:access_token.
public string RequestedTokenType { get; set; }
Property Value
Scopes
Optional: OAuth2 scopes to request
public RepeatedField<string> Scopes { get; }
Property Value
- RepeatedField<string>
SubjectToken
Subject token metadata for token_exchange grants.
public ProviderCredentialTokenGrantSubjectToken SubjectToken { get; set; }
Property Value
TokenEndpoint
OAuth2 token endpoint URL (e.g., https://keycloak.example.com/realms/my-realm/protocol/openid-connect/token)
public string TokenEndpoint { get; set; }
Property Value
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public ProviderCredentialTokenGrant Clone()
Returns
- ProviderCredentialTokenGrant
A deep clone of this object.
Equals(ProviderCredentialTokenGrant)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ProviderCredentialTokenGrant other)
Parameters
otherProviderCredentialTokenGrantAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(ProviderCredentialTokenGrant)
Merges the given message into this one.
public void MergeFrom(ProviderCredentialTokenGrant other)
Parameters
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.