Stay organized with collections Save and categorize content based on your preferences.

GetCustomCredentialOption

public class GetCustomCredentialOption extends CredentialOption


Allows extending custom versions of GetCredentialOptions for unique use cases.

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

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

Throws
kotlin.IllegalArgumentException kotlin.IllegalArgumentException

If type is empty

kotlin.NullPointerException kotlin.NullPointerException

If requestData or type is null

Summary

Public constructors

GetCustomCredentialOption(
    @NonNull String type,
    @NonNull Bundle requestData,
    @NonNull Bundle candidateQueryData,
    boolean isSystemProviderRequired,
    boolean isAutoSelectAllowed
)

Public methods

final @NonNull Bundle

the partial request data in the Bundle format that will be sent to the provider during the initial candidate query stage, which should not contain sensitive user information

final @NonNull Bundle

the request data in the Bundle format, generated for custom use cases

final @NonNull String

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

final boolean

defines if a credential entry will be automatically chosen if it is the only one available option, false by default

final boolean

true if must only be fulfilled by a system provider and false otherwise

Public constructors

GetCustomCredentialOption

public GetCustomCredentialOption(
    @NonNull String type,
    @NonNull Bundle requestData,
    @NonNull Bundle candidateQueryData,
    boolean isSystemProviderRequired,
    boolean isAutoSelectAllowed
)

Public methods

getCandidateQueryData

public final @NonNull Bundle getCandidateQueryData()

the partial request data in the Bundle format that will be sent to the provider during the initial candidate query stage, which should not contain sensitive user information

getRequestData

public final @NonNull Bundle getRequestData()

the request data in the Bundle format, generated for custom use cases

getType

public final @NonNull String getType()

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

isAutoSelectAllowed

public final boolean isAutoSelectAllowed()

defines if a credential entry will be automatically chosen if it is the only one available option, false by default

isSystemProviderRequired

public final boolean isSystemProviderRequired()

true if must only be fulfilled by a system provider and false otherwise