OAuthProvider.CredentialBuilder

class OAuthProvider.CredentialBuilder


Builder class to initialize AuthCredential's.

Summary

Public functions

AuthCredential

Returns the AuthCredential that this CredentialBuilder has constructed.

OAuthProvider.CredentialBuilder
setIdTokenWithRawNonce(idToken: String, rawNonce: String?)

Adds an ID token and raw nonce to the credential being built.

Public functions

build

fun build(): AuthCredential

Returns the AuthCredential that this CredentialBuilder has constructed.

Throws
java.lang.IllegalArgumentException

if an ID token and access token were not provided.

setIdTokenWithRawNonce

fun setIdTokenWithRawNonce(idToken: String, rawNonce: String?): OAuthProvider.CredentialBuilder

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.