public static class TokenVerifier.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
TokenVerifier |
build()
Build the custom TokenVerifier for verifying tokens.
|
TokenVerifier.Builder |
setAudience(String audience)
Set a target audience to verify.
|
TokenVerifier.Builder |
setCertificatesLocation(String certificatesLocation)
Override the location URL that contains published public keys.
|
TokenVerifier.Builder |
setClock(com.google.api.client.util.Clock clock)
Set the clock for checking token expiry.
|
TokenVerifier.Builder |
setHttpTransportFactory(HttpTransportFactory httpTransportFactory)
Set the HttpTransportFactory used for requesting public keys from the certificate URL.
|
TokenVerifier.Builder |
setIssuer(String issuer)
Set the issuer to verify.
|
TokenVerifier.Builder |
setPublicKey(PublicKey publicKey)
Set the PublicKey for verifying the signature.
|
public TokenVerifier.Builder setAudience(String audience)
audience
- the audience claim to verifypublic TokenVerifier.Builder setCertificatesLocation(String certificatesLocation)
certificatesLocation
- URL to published public keyspublic TokenVerifier.Builder setIssuer(String issuer)
issuer
- the issuer claim to verifypublic TokenVerifier.Builder setPublicKey(PublicKey publicKey)
publicKey
- the public key to validate the signaturepublic TokenVerifier.Builder setClock(com.google.api.client.util.Clock clock)
clock
- the clock to use. Defaults to the system clockpublic TokenVerifier.Builder setHttpTransportFactory(HttpTransportFactory httpTransportFactory)
httpTransportFactory
- the HttpTransportFactory used to build certificate URL requestspublic TokenVerifier build()
Copyright © 2023 Google. All rights reserved.