public sealed class AuthRequirement : IMessage<AuthRequirement>, IEquatable<AuthRequirement>, IDeepCloneable<AuthRequirement>, IBufferMessage, IMessage
User-defined authentication requirements, including support for JSON Web Token (JWT).
Implements
IMessageAuthRequirement, IEquatableAuthRequirement, IDeepCloneableAuthRequirement, IBufferMessage, IMessageNamespace
Google.ApiAssembly
Google.Api.CommonProtos.dll
Constructors
AuthRequirement()
public AuthRequirement()
AuthRequirement(AuthRequirement)
public AuthRequirement(AuthRequirement other)
Parameter | |
---|---|
Name | Description |
other |
AuthRequirement |
Fields
AudiencesFieldNumber
public const int AudiencesFieldNumber = 2
Field number for the "audiences" field.
Field Value | |
---|---|
Type | Description |
int |
ProviderIdFieldNumber
public const int ProviderIdFieldNumber = 1
Field number for the "provider_id" field.
Field Value | |
---|---|
Type | Description |
int |
Properties
Audiences
public string Audiences { get; set; }
NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components.
The list of JWT audiences. that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, only JWTs with audience "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]" will be accepted. For example, if no audiences are in the setting, LibraryService API will only accept JWTs with the following audience "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
Example:
audiences: bookstore_android.apps.googleusercontent.com,
bookstore_web.apps.googleusercontent.com
Property Value | |
---|---|
Type | Description |
string |
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value | |
---|---|
Type | Description |
MessageDescriptor |
Parser
public static MessageParser<AuthRequirement> Parser { get; }
Property Value | |
---|---|
Type | Description |
MessageParserAuthRequirement |
ProviderId
public string ProviderId { get; set; }
[id][google.api.AuthProvider.id] from authentication provider.
Example:
provider_id: bookstore_auth
Property Value | |
---|---|
Type | Description |
string |
Methods
CalculateSize()
public int CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
Returns | |
---|---|
Type | Description |
int |
The number of bytes required to write this message to a coded output stream. |
Clone()
public AuthRequirement Clone()
Creates a deep clone of this object.
Returns | |
---|---|
Type | Description |
AuthRequirement |
A deep clone of this object. |
Equals(AuthRequirement)
public bool Equals(AuthRequirement other)
Parameter | |
---|---|
Name | Description |
other |
AuthRequirement |
Returns | |
---|---|
Type | Description |
bool |
Equals(object)
public override bool Equals(object other)
Parameter | |
---|---|
Name | Description |
other |
object |
Returns | |
---|---|
Type | Description |
bool |
GetHashCode()
public override int GetHashCode()
Returns | |
---|---|
Type | Description |
int |
MergeFrom(AuthRequirement)
public void MergeFrom(AuthRequirement other)
Merges the given message into this one.
Parameter | |
---|---|
Name | Description |
other |
AuthRequirement |
See the user guide for precise merge semantics.
MergeFrom(CodedInputStream)
public void MergeFrom(CodedInputStream input)
Merges the data from the specified coded input stream with the current message.
Parameter | |
---|---|
Name | Description |
input |
CodedInputStream |
See the user guide for precise merge semantics.
ToString()
public override string ToString()
Returns | |
---|---|
Type | Description |
string |
WriteTo(CodedOutputStream)
public void WriteTo(CodedOutputStream output)
Writes the data to the given coded output stream.
Parameter | |
---|---|
Name | Description |
output |
CodedOutputStream Coded output stream to write the data to. Must not be null. |