public static class IdTokenVerifier.Builder
Constructors
Builder()
public Builder()
Methods
build()
public IdTokenVerifier build()
Builds a new instance of IdTokenVerifier.
Type | Description |
IdTokenVerifier |
getAcceptableTimeSkewSeconds()
public final long getAcceptableTimeSkewSeconds()
Returns the seconds of time skew to accept when verifying time.
Type | Description |
long |
getAudience()
public final Collection<String> getAudience()
Returns the list of trusted audience client IDs or null
to suppress the audience
check.
Type | Description |
Collection<String> |
getClock()
public final Clock getClock()
Returns the clock.
Type | Description |
com.google.api.client.util.Clock |
getIssuer()
public final String getIssuer()
Returns the first of equivalent expected issuers or null
if issuer check suppressed.
Type | Description |
String |
getIssuers()
public final Collection<String> getIssuers()
Returns the equivalent expected issuers or null
if issuer check suppressed.
Type | Description |
Collection<String> |
setAcceptableTimeSkewSeconds(long acceptableTimeSkewSeconds)
public IdTokenVerifier.Builder setAcceptableTimeSkewSeconds(long acceptableTimeSkewSeconds)
Sets the seconds of time skew to accept when verifying time (default is #DEFAULT_TIME_SKEW_SECONDS).
It must be greater or equal to zero.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
acceptableTimeSkewSeconds | long |
Type | Description |
IdTokenVerifier.Builder |
setAudience(Collection<String> audience)
public IdTokenVerifier.Builder setAudience(Collection<String> audience)
Sets the list of trusted audience client IDs or null
to suppress the audience check.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
audience | Collection<String> |
Type | Description |
IdTokenVerifier.Builder |
setCertificatesLocation(String certificatesLocation)
public IdTokenVerifier.Builder setCertificatesLocation(String certificatesLocation)
Override the location URL that contains published public keys. Defaults to well-known Google locations.
Name | Description |
certificatesLocation | String URL to published public keys |
Type | Description |
IdTokenVerifier.Builder | the builder |
setClock(Clock clock)
public IdTokenVerifier.Builder setClock(Clock clock)
Sets the clock.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
clock | com.google.api.client.util.Clock |
Type | Description |
IdTokenVerifier.Builder |
setHttpTransportFactory(HttpTransportFactory httpTransportFactory)
public IdTokenVerifier.Builder setHttpTransportFactory(HttpTransportFactory httpTransportFactory)
Sets the HttpTransportFactory used for requesting public keys from the certificate URL. Used mostly for testing.
Name | Description |
httpTransportFactory | HttpTransportFactory the HttpTransportFactory used to build certificate URL requests |
Type | Description |
IdTokenVerifier.Builder | the builder |
setIssuer(String issuer)
public IdTokenVerifier.Builder setIssuer(String issuer)
Sets the expected issuer or null
to suppress the issuer check.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
issuer | String |
Type | Description |
IdTokenVerifier.Builder |
setIssuers(Collection<String> issuers)
public IdTokenVerifier.Builder setIssuers(Collection<String> issuers)
Sets the list of equivalent expected issuers or null
to suppress the issuer check.
Typically only a single issuer should be used, but multiple may be specified to support an
issuer transitioning to a new string. The collection must not be empty.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Name | Description |
issuers | Collection<String> |
Type | Description |
IdTokenVerifier.Builder |