Class AuthProvider (2.38.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
Type Description
int

AUTHORIZATION_URL_FIELD_NUMBER

public static final int AUTHORIZATION_URL_FIELD_NUMBER
Field Value
Type Description
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
Type Description
int

ISSUER_FIELD_NUMBER

public static final int ISSUER_FIELD_NUMBER
Field Value
Type Description
int

JWKS_URI_FIELD_NUMBER

public static final int JWKS_URI_FIELD_NUMBER
Field Value
Type Description
int

JWT_LOCATIONS_FIELD_NUMBER

public static final int JWT_LOCATIONS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AuthProvider getDefaultInstance()
Returns
Type Description
AuthProvider

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static AuthProvider.Builder newBuilder()
Returns
Type Description
AuthProvider.Builder

newBuilder(AuthProvider prototype)

public static AuthProvider.Builder newBuilder(AuthProvider prototype)
Parameter
Name Description
prototype AuthProvider
Returns
Type Description
AuthProvider.Builder

parseDelimitedFrom(InputStream input)

public static AuthProvider parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AuthProvider
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthProvider
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AuthProvider parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AuthProvider
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthProvider
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AuthProvider parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AuthProvider
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthProvider
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AuthProvider parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AuthProvider
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthProvider
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AuthProvider parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AuthProvider
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthProvider
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AuthProvider parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AuthProvider
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AuthProvider parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthProvider
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AuthProvider> parser()
Returns
Type Description
Parser<AuthProvider>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for authorizationUrl.

getDefaultInstanceForType()

public AuthProvider getDefaultInstanceForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
List<? extends com.google.api.JwtLocationOrBuilder>

getParserForType()

public Parser<AuthProvider> getParserForType()
Returns
Type Description
Parser<AuthProvider>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AuthProvider.Builder newBuilderForType()
Returns
Type Description
AuthProvider.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AuthProvider.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AuthProvider.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AuthProvider.Builder toBuilder()
Returns
Type Description
AuthProvider.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException