Class AuthProvider (2.24.0)

public final class AuthProvider extends GeneratedMessageV3 implements AuthProviderOrBuilder

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

Protobuf type google.api.AuthProvider

Static Fields

AUDIENCES_FIELD_NUMBER

public static final int AUDIENCES_FIELD_NUMBER
Field Value
TypeDescription
int

AUTHORIZATION_URL_FIELD_NUMBER

public static final int AUTHORIZATION_URL_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

ISSUER_FIELD_NUMBER

public static final int ISSUER_FIELD_NUMBER
Field Value
TypeDescription
int

JWKS_URI_FIELD_NUMBER

public static final int JWKS_URI_FIELD_NUMBER
Field Value
TypeDescription
int

JWT_LOCATIONS_FIELD_NUMBER

public static final int JWT_LOCATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AuthProvider getDefaultInstance()
Returns
TypeDescription
AuthProvider

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static AuthProvider.Builder newBuilder()
Returns
TypeDescription
AuthProvider.Builder

newBuilder(AuthProvider prototype)

public static AuthProvider.Builder newBuilder(AuthProvider prototype)
Parameter
NameDescription
prototypeAuthProvider
Returns
TypeDescription
AuthProvider.Builder

parseDelimitedFrom(InputStream input)

public static AuthProvider parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static AuthProvider parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AuthProvider parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AuthProvider parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static AuthProvider parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static AuthProvider parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthProvider
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<AuthProvider> parser()
Returns
TypeDescription
Parser<AuthProvider>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAudiences()

public String getAudiences()

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, JWTs with audiences:

string audiences = 4;

Returns
TypeDescription
String

The audiences.

getAudiencesBytes()

public ByteString getAudiencesBytes()

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, JWTs with audiences:

string audiences = 4;

Returns
TypeDescription
ByteString

The bytes for audiences.

getAuthorizationUrl()

public String getAuthorizationUrl()

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

string authorization_url = 5;

Returns
TypeDescription
String

The authorizationUrl.

getAuthorizationUrlBytes()

public ByteString getAuthorizationUrlBytes()

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

string authorization_url = 5;

Returns
TypeDescription
ByteString

The bytes for authorizationUrl.

getDefaultInstanceForType()

public AuthProvider getDefaultInstanceForType()
Returns
TypeDescription
AuthProvider

getId()

public String getId()

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

Example: "bookstore_auth".

string id = 1;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

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

Example: "bookstore_auth".

string id = 1;

Returns
TypeDescription
ByteString

The bytes for id.

getIssuer()

public String getIssuer()

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

string issuer = 2;

Returns
TypeDescription
String

The issuer.

getIssuerBytes()

public ByteString getIssuerBytes()

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

string issuer = 2;

Returns
TypeDescription
ByteString

The bytes for issuer.

getJwksUri()

public String getJwksUri()

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

string jwks_uri = 3;

Returns
TypeDescription
String

The jwksUri.

getJwksUriBytes()

public ByteString getJwksUriBytes()

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

string jwks_uri = 3;

Returns
TypeDescription
ByteString

The bytes for jwksUri.

getJwtLocations(int index)

public JwtLocation getJwtLocations(int index)

Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension x-google-jwt-locations

JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins.

If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter

Default locations can be specified as followings: jwt_locations:

  • header: Authorization value_prefix: "Bearer "
  • header: x-goog-iap-jwt-assertion
  • query: access_token

repeated .google.api.JwtLocation jwt_locations = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
JwtLocation

getJwtLocationsCount()

public int getJwtLocationsCount()

Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension x-google-jwt-locations

JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins.

If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter

Default locations can be specified as followings: jwt_locations:

  • header: Authorization value_prefix: "Bearer "
  • header: x-goog-iap-jwt-assertion
  • query: access_token

repeated .google.api.JwtLocation jwt_locations = 6;

Returns
TypeDescription
int

getJwtLocationsList()

public List<JwtLocation> getJwtLocationsList()

Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension x-google-jwt-locations

JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins.

If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter

Default locations can be specified as followings: jwt_locations:

  • header: Authorization value_prefix: "Bearer "
  • header: x-goog-iap-jwt-assertion
  • query: access_token

repeated .google.api.JwtLocation jwt_locations = 6;

Returns
TypeDescription
List<JwtLocation>

getJwtLocationsOrBuilder(int index)

public JwtLocationOrBuilder getJwtLocationsOrBuilder(int index)

Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension x-google-jwt-locations

JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins.

If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter

Default locations can be specified as followings: jwt_locations:

  • header: Authorization value_prefix: "Bearer "
  • header: x-goog-iap-jwt-assertion
  • query: access_token

repeated .google.api.JwtLocation jwt_locations = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
JwtLocationOrBuilder

getJwtLocationsOrBuilderList()

public List<? extends JwtLocationOrBuilder> getJwtLocationsOrBuilderList()

Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension x-google-jwt-locations

JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins.

If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter

Default locations can be specified as followings: jwt_locations:

  • header: Authorization value_prefix: "Bearer "
  • header: x-goog-iap-jwt-assertion
  • query: access_token

repeated .google.api.JwtLocation jwt_locations = 6;

Returns
TypeDescription
List<? extends com.google.api.JwtLocationOrBuilder>

getParserForType()

public Parser<AuthProvider> getParserForType()
Returns
TypeDescription
Parser<AuthProvider>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public AuthProvider.Builder newBuilderForType()
Returns
TypeDescription
AuthProvider.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AuthProvider.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
AuthProvider.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public AuthProvider.Builder toBuilder()
Returns
TypeDescription
AuthProvider.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException