Show / Hide Table of Contents

Class AuthProvider

Configuration for an authentication provider, including support for JSON Web Token (JWT).

Inheritance
System.Object
AuthProvider
Implements
IMessage<AuthProvider>
IMessage
System.IEquatable<AuthProvider>
IDeepCloneable<AuthProvider>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api
Assembly: Google.Api.CommonProtos.dll
Syntax
public sealed class AuthProvider : IMessage<AuthProvider>, IMessage, IEquatable<AuthProvider>, IDeepCloneable<AuthProvider>

Constructors

AuthProvider()

Declaration
public AuthProvider()

AuthProvider(AuthProvider)

Declaration
public AuthProvider(AuthProvider other)
Parameters
Type Name Description
AuthProvider other

Fields

AudiencesFieldNumber

Field number for the "audiences" field.

Declaration
public const int AudiencesFieldNumber = 4
Field Value
Type Description
System.Int32

AuthorizationUrlFieldNumber

Field number for the "authorization_url" field.

Declaration
public const int AuthorizationUrlFieldNumber = 5
Field Value
Type Description
System.Int32

IdFieldNumber

Field number for the "id" field.

Declaration
public const int IdFieldNumber = 1
Field Value
Type Description
System.Int32

IssuerFieldNumber

Field number for the "issuer" field.

Declaration
public const int IssuerFieldNumber = 2
Field Value
Type Description
System.Int32

JwksUriFieldNumber

Field number for the "jwks_uri" field.

Declaration
public const int JwksUriFieldNumber = 3
Field Value
Type Description
System.Int32

Properties

Audiences

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

Declaration
public string Audiences { get; set; }
Property Value
Type Description
System.String

AuthorizationUrl

Redirect URL if JWT token is required but not present or is expired. Implement authorizationUrl of securityDefinitions in OpenAPI spec.

Declaration
public string AuthorizationUrl { get; set; }
Property Value
Type Description
System.String

Descriptor

Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
Type Description
MessageDescriptor

Id

The unique identifier of the auth provider. It will be referred to by AuthRequirement.provider_id.

Example: "bookstore_auth".

Declaration
public string Id { get; set; }
Property Value
Type Description
System.String

Issuer

Identifies the principal that issued the JWT. See https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 Usually a URL or an email address.

Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com

Declaration
public string Issuer { get; set; }
Property Value
Type Description
System.String

JwksUri

URL of the provider's public key set to validate signature of the JWT. See OpenID Discovery. Optional if the key set document:

  • can be retrieved from [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html of the issuer.
  • can be inferred from the email domain of the issuer (e.g. a Google service account).

Example: https://www.googleapis.com/oauth2/v1/certs

Declaration
public string JwksUri { get; set; }
Property Value
Type Description
System.String

Parser

Declaration
public static MessageParser<AuthProvider> Parser { get; }
Property Value
Type Description
MessageParser<AuthProvider>

Methods

CalculateSize()

Declaration
public int CalculateSize()
Returns
Type Description
System.Int32
Implements
IMessage.CalculateSize()

Clone()

Declaration
public AuthProvider Clone()
Returns
Type Description
AuthProvider
Implements
IDeepCloneable<T>.Clone()

Equals(AuthProvider)

Declaration
public bool Equals(AuthProvider other)
Parameters
Type Name Description
AuthProvider other
Returns
Type Description
System.Boolean
Implements
System.IEquatable<T>.Equals(T)

Equals(Object)

Declaration
public override bool Equals(object other)
Parameters
Type Name Description
System.Object other
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

MergeFrom(AuthProvider)

Declaration
public void MergeFrom(AuthProvider other)
Parameters
Type Name Description
AuthProvider other
Implements
IMessage<T>.MergeFrom(T)

MergeFrom(CodedInputStream)

Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Type Name Description
CodedInputStream input
Implements
IMessage.MergeFrom(CodedInputStream)

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

WriteTo(CodedOutputStream)

Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Type Name Description
CodedOutputStream output
Implements
IMessage.WriteTo(CodedOutputStream)

Explicit Interface Implementations

IMessage.Descriptor

Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Type Description
MessageDescriptor
Implements
IMessage.Descriptor
Back to top