Class GoogleIdTokenVerifier.Builder (2.0.0)

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
NameDescription
publicKeysGooglePublicKeysManager

Google public keys manager

Builder(HttpTransport transport, JsonFactory jsonFactory)

public Builder(HttpTransport transport, JsonFactory jsonFactory)
Parameters
NameDescription
transportcom.google.api.client.http.HttpTransport

HTTP transport

jsonFactorycom.google.api.client.json.JsonFactory

JSON factory

Methods

build()

public GoogleIdTokenVerifier build()

Builds a new instance of GoogleIdTokenVerifier.

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

getJsonFactory()

public final JsonFactory getJsonFactory()

Returns the JSON factory.

Returns
TypeDescription
com.google.api.client.json.JsonFactory

getPublicCerts()

public final GooglePublicKeysManager getPublicCerts()

Returns the Google public keys manager.

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

getTransport()

public final HttpTransport getTransport()

Returns the HTTP transport.

Returns
TypeDescription
com.google.api.client.http.HttpTransport

setAcceptableTimeSkewSeconds(long acceptableTimeSkewSeconds)

public GoogleIdTokenVerifier.Builder setAcceptableTimeSkewSeconds(long acceptableTimeSkewSeconds)
Parameter
NameDescription
acceptableTimeSkewSecondslong
Returns
TypeDescription
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
NameDescription
audienceCollection<String>
Returns
TypeDescription
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
NameDescription
clockcom.google.api.client.util.Clock
Returns
TypeDescription
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
NameDescription
issuerString
Returns
TypeDescription
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
NameDescription
issuersCollection<String>
Returns
TypeDescription
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
NameDescription
publicKeysEncodedUrlString
Returns
TypeDescription
GoogleIdTokenVerifier.Builder