CustomCredential


open class CustomCredential : Credential


Base class for a custom credential with which the user consented to authenticate to the app.

If you get a CustomCredential instead of a type-safe credential class such as PasswordCredential, PublicKeyCredential, etc., then you should check if you have any other library at interest that supports this custom type of credential, and if so use its parsing utilities to resolve to a type-safe class within that library.

Note: The Bundle keys for data should not be in the form of androidx.credentials.* as they are reserved for internal use by this androidx library.

Summary

Public constructors

CustomCredential(type: String, data: Bundle)

Inherited properties

From androidx.credentials.Credential
Bundle

the credential data in the Bundle format

String

the credential type determined by the credential-type-specific subclass (e.g. PasswordCredential.TYPE_PASSWORD_CREDENTIAL for PasswordCredential or PublicKeyCredential.TYPE_PUBLIC_KEY_CREDENTIAL for PublicKeyCredential)

Public constructors

CustomCredential

Added in 1.2.0
CustomCredential(type: String, data: Bundle)
Parameters
type: String

the credential type determined by the credential-type-specific subclass for custom use cases

data: Bundle

the credential data in the Bundle format for custom use cases (note: bundle keys in the form of androidx.credentials.* and android.credentials.* are reserved for internal library usage)