Builder
class Builder
A builder for CredentialOption
.
Summary
Public constructors
Builder
Builder(
type: String,
credentialRetrievalData: Bundle,
candidateQueryData: Bundle)
Parameters |
type |
String: the type of the credential option This value cannot be null . |
credentialRetrievalData |
Bundle: the full request data This value cannot be null . |
candidateQueryData |
Bundle: the partial request data that will be sent to the provider during the initial credential candidate query stage. This value cannot be null . |
Exceptions |
java.lang.IllegalArgumentException |
If type is null, or empty |
java.lang.NullPointerException |
If credentialRetrievalData , or candidateQueryData is null |
Public methods
addAllowedProvider
fun addAllowedProvider(allowedProvider: ComponentName): CredentialOption.Builder
Adds a provider ComponentName
to be queried while gathering credentials from credential providers on the device. If no candidate providers are specified, all user configured and system credential providers will be queried in the candidate query phase. If an invalid component name is provided, or a service corresponding to the component name does not exist on the device, that component name is ignored. If all component names are invalid, or not present on the device, no providers are queried and no credentials are retrieved.
Parameters |
allowedProvider |
ComponentName: This value cannot be null . |
Exceptions |
java.lang.NullPointerException |
If allowedProvider is null |
setAllowedProviders
fun setAllowedProviders(allowedProviders: MutableSet<ComponentName!>): CredentialOption.Builder
Sets a set of provider ComponentName
to be queried while gathering credentials from credential providers on the device. If no candidate providers are specified, all user configured and system credential providers will be queried in the candidate query phase. If an invalid component name is provided, or a service corresponding to the component name does not exist on the device, that component name is ignored. If all component names are invalid, or not present on the device, no providers are queried and no credentials are retrieved.
Exceptions |
java.lang.NullPointerException |
If allowedProviders is null, or any of its elements are null. |
setIsSystemProviderRequired
fun setIsSystemProviderRequired(isSystemProviderRequired: Boolean): CredentialOption.Builder
Sets a true/false value corresponding to whether this option must be serviced by system credentials providers only.