Class AuthRequirement (2.2.0)

public sealed class AuthRequirement : Protobuf.IMessage<AuthRequirement>, Protobuf.IBufferMessage

User-defined authentication requirements, including support for JSON Web Token (JWT).

Inheritance

Object > AuthRequirement

Namespace

Google.Api

Assembly

Google.Api.CommonProtos.dll

Constructors

AuthRequirement()

public AuthRequirement()

AuthRequirement(AuthRequirement)

public AuthRequirement(AuthRequirement other)
Parameter
NameDescription
otherAuthRequirement

Fields

AudiencesFieldNumber

public const int AudiencesFieldNumber = 2

Field number for the "audiences" field.

Field Value
TypeDescription
Int32

ProviderIdFieldNumber

public const int ProviderIdFieldNumber = 1

Field number for the "provider_id" field.

Field Value
TypeDescription
Int32

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

Descriptor

public static Protobuf.Reflection.MessageDescriptor Descriptor { get; }
Property Value
TypeDescription
Protobuf.Reflection.MessageDescriptor

Parser

public static Protobuf.MessageParser<AuthRequirement> Parser { get; }
Property Value
TypeDescription
Protobuf.MessageParser<AuthRequirement>

ProviderId

public string ProviderId { get; set; }

[id][google.api.AuthProvider.id] from authentication provider.

Example:

provider_id: bookstore_auth

Property Value
TypeDescription
String

Methods

CalculateSize()

public int CalculateSize()
Returns
TypeDescription
Int32

Clone()

public AuthRequirement Clone()
Returns
TypeDescription
AuthRequirement

Equals(AuthRequirement)

public bool Equals(AuthRequirement other)
Parameter
NameDescription
otherAuthRequirement
Returns
TypeDescription
Boolean

Equals(Object)

public override bool Equals(object other)
Parameter
NameDescription
otherObject
Returns
TypeDescription
Boolean

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32

MergeFrom(AuthRequirement)

public void MergeFrom(AuthRequirement other)
Parameter
NameDescription
otherAuthRequirement

MergeFrom(Protobuf.CodedInputStream)

public void MergeFrom(Protobuf.CodedInputStream input)
Parameter
NameDescription
inputProtobuf.CodedInputStream

ToString()

public override string ToString()
Returns
TypeDescription
String

WriteTo(Protobuf.CodedOutputStream)

public void WriteTo(Protobuf.CodedOutputStream output)
Parameter
NameDescription
outputProtobuf.CodedOutputStream