Class GoogleIdTokenVerifier.Builder (2.1.2)

public static class GoogleIdTokenVerifier.Builder extends IdTokenVerifier.Builder

Beta
Builder for GoogleIdTokenVerifier.

Implementation is not thread-safe.

Inheritance

java.lang.Object > com.google.api.client.auth.openidconnect.IdTokenVerifier.Builder > GoogleIdTokenVerifier.Builder

Constructors

Builder(GooglePublicKeysManager publicKeys)

public Builder(GooglePublicKeysManager publicKeys)
Parameter
Name Description
publicKeys GooglePublicKeysManager

Google public keys manager

Builder(HttpTransport transport, JsonFactory jsonFactory)

public Builder(HttpTransport transport, JsonFactory jsonFactory)
Parameters
Name Description
transport com.google.api.client.http.HttpTransport

HTTP transport

jsonFactory com.google.api.client.json.JsonFactory

JSON factory

Methods

build()

public GoogleIdTokenVerifier build()

Builds a new instance of GoogleIdTokenVerifier.

Returns
Type Description
GoogleIdTokenVerifier
Overrides
com.google.api.client.auth.openidconnect.IdTokenVerifier.Builder.build()

getJsonFactory()

public final JsonFactory getJsonFactory()

Returns the JSON factory.

Returns
Type Description
com.google.api.client.json.JsonFactory

getPublicCerts()

public final GooglePublicKeysManager getPublicCerts()

Returns the Google public keys manager.

Returns
Type Description
GooglePublicKeysManager

getPublicCertsEncodedUrl() (deprecated)

public final String getPublicCertsEncodedUrl()

Deprecated. (scheduled to be removed in 1.18) Use #getPublicCerts() and GooglePublicKeysManager#getPublicCertsEncodedUrl() instead.

Returns the public certificates encoded URL.

Returns
Type Description
String

getTransport()

public final HttpTransport getTransport()

Returns the HTTP transport.

Returns
Type Description
com.google.api.client.http.HttpTransport

setAcceptableTimeSkewSeconds(long acceptableTimeSkewSeconds)

public GoogleIdTokenVerifier.Builder setAcceptableTimeSkewSeconds(long acceptableTimeSkewSeconds)
Parameter
Name Description
acceptableTimeSkewSeconds long
Returns
Type Description
GoogleIdTokenVerifier.Builder
Overrides
com.google.api.client.auth.openidconnect.IdTokenVerifier.Builder.setAcceptableTimeSkewSeconds(long)

setAudience(Collection<String> audience)

public GoogleIdTokenVerifier.Builder setAudience(Collection<String> audience)
Parameter
Name Description
audience Collection<String>
Returns
Type Description
GoogleIdTokenVerifier.Builder
Overrides
com.google.api.client.auth.openidconnect.IdTokenVerifier.Builder.setAudience(java.util.Collection<java.lang.String>)

setClock(Clock clock)

public GoogleIdTokenVerifier.Builder setClock(Clock clock)
Parameter
Name Description
clock com.google.api.client.util.Clock
Returns
Type Description
GoogleIdTokenVerifier.Builder
Overrides
com.google.api.client.auth.openidconnect.IdTokenVerifier.Builder.setClock(com.google.api.client.util.Clock)

setIssuer(String issuer)

public GoogleIdTokenVerifier.Builder setIssuer(String issuer)
Parameter
Name Description
issuer String
Returns
Type Description
GoogleIdTokenVerifier.Builder
Overrides
com.google.api.client.auth.openidconnect.IdTokenVerifier.Builder.setIssuer(java.lang.String)

setIssuers(Collection<String> issuers)

public GoogleIdTokenVerifier.Builder setIssuers(Collection<String> issuers)
Parameter
Name Description
issuers Collection<String>
Returns
Type Description
GoogleIdTokenVerifier.Builder
Overrides
com.google.api.client.auth.openidconnect.IdTokenVerifier.Builder.setIssuers(java.util.Collection<java.lang.String>)

setPublicCertsEncodedUrl(String publicKeysEncodedUrl) (deprecated)

public GoogleIdTokenVerifier.Builder setPublicCertsEncodedUrl(String publicKeysEncodedUrl)

Deprecated. (scheduled to be removed in 1.18) Use GooglePublicKeysManager.Builder#setPublicCertsEncodedUrl(String) instead.

Sets the public certificates encoded URL.

The default value is GoogleOAuthConstants#DEFAULT_PUBLIC_CERTS_ENCODED_URL.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameter
Name Description
publicKeysEncodedUrl String
Returns
Type Description
GoogleIdTokenVerifier.Builder