@Beta public static class IdTokenVerifier.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
IdTokenVerifier |
build()
Builds a new instance of
IdTokenVerifier . |
long |
getAcceptableTimeSkewSeconds()
Returns the seconds of time skew to accept when verifying time.
|
Collection<String> |
getAudience()
Returns the list of trusted audience client IDs or
null to suppress the audience
check. |
Clock |
getClock()
Returns the clock.
|
String |
getIssuer()
Returns the first of equivalent expected issuers or
null if issuer check suppressed. |
Collection<String> |
getIssuers()
Returns the equivalent expected issuers or
null if issuer check suppressed. |
IdTokenVerifier.Builder |
setAcceptableTimeSkewSeconds(long acceptableTimeSkewSeconds)
Sets the seconds of time skew to accept when verifying time (default is
IdTokenVerifier.DEFAULT_TIME_SKEW_SECONDS ). |
IdTokenVerifier.Builder |
setAudience(Collection<String> audience)
Sets the list of trusted audience client IDs or
null to suppress the audience check. |
IdTokenVerifier.Builder |
setClock(Clock clock)
Sets the clock.
|
IdTokenVerifier.Builder |
setIssuer(String issuer)
Sets the expected issuer or
null to suppress the issuer check. |
IdTokenVerifier.Builder |
setIssuers(Collection<String> issuers)
Sets the list of equivalent expected issuers or
null to suppress the issuer check. |
public IdTokenVerifier build()
IdTokenVerifier
.public final Clock getClock()
public IdTokenVerifier.Builder setClock(Clock clock)
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
public final String getIssuer()
null
if issuer check suppressed.public IdTokenVerifier.Builder setIssuer(String issuer)
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.
public final Collection<String> getIssuers()
null
if issuer check suppressed.public IdTokenVerifier.Builder setIssuers(Collection<String> issuers)
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.
public final Collection<String> getAudience()
null
to suppress the audience
check.public IdTokenVerifier.Builder setAudience(Collection<String> audience)
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.
public final long getAcceptableTimeSkewSeconds()
public IdTokenVerifier.Builder setAcceptableTimeSkewSeconds(long acceptableTimeSkewSeconds)
IdTokenVerifier.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.
Copyright © 2011–2020 Google. All rights reserved.