OAuthProvider.CredentialBuilder

public class OAuthProvider.CredentialBuilder


Builder class to initialize AuthCredential's.

Summary

Public methods

@NonNull AuthCredential

Returns the AuthCredential that this CredentialBuilder has constructed.

@NonNull OAuthProvider.CredentialBuilder

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

Public methods

build

public @NonNull AuthCredential build()

Returns the AuthCredential that this CredentialBuilder has constructed.

Throws
java.lang.IllegalArgumentException

if an ID token and access token were not provided.

setIdTokenWithRawNonce

public @NonNull OAuthProvider.CredentialBuilder setIdTokenWithRawNonce(@NonNull String idToken, @Nullable 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.