Builder class to initialize AuthCredential
's.
Public Method Summary
AuthCredential |
build()
Returns the
AuthCredential
that this
OAuthProvider.CredentialBuilder has constructed.
|
OAuthProvider.CredentialBuilder | |
OAuthProvider.CredentialBuilder | |
OAuthProvider.CredentialBuilder |
setIdTokenWithRawNonce(String idToken,
String
rawNonce)
Adds an ID token and raw nonce to the credential being built.
|
Inherited Method Summary
Public Methods
public AuthCredential build ()
Returns the AuthCredential
that this OAuthProvider.CredentialBuilder
has constructed.
Throws
IllegalArgumentException | if an ID token and access token were not provided. |
---|
public OAuthProvider.CredentialBuilder setAccessToken (String accessToken)
Adds an access token to the credential being built.
public OAuthProvider.CredentialBuilder setIdToken (String idToken)
Adds an ID token to the credential being built.
If this is an OIDC ID token with a nonce field, please use
setIdTokenWithRawNonce(String, String)
instead.
public OAuthProvider.CredentialBuilder setIdTokenWithRawNonce (String idToken, String rawNonce)
Adds an ID token and raw nonce to the credential being built.
The raw nonce is required when an OIDC ID token with a nonce field is provided. The SHA-256 hash of the raw nonce must match the nonce field in the OIDC ID token.