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

CreatePasswordRequest

public final class CreatePasswordRequest extends CreateCredentialRequest


A request to save the user password credential with their password provider.

Summary

Public constructors

CreatePasswordRequest(
    @NonNull String id,
    @NonNull String password,
    String origin
)

Constructs a CreatePasswordRequest to save the user password credential with their password provider.

Public methods

final @NonNull String

the user id associated with the password

final @NonNull String

the password

Public constructors

CreatePasswordRequest

public CreatePasswordRequest(
    @NonNull String id,
    @NonNull String password,
    String origin
)

Constructs a CreatePasswordRequest to save the user password credential with their password provider.

Parameters
@NonNull String id

the user id associated with the password

@NonNull String password

the password

String origin

the origin of a different application if the request is being made on behalf of that application. For API level >=34, setting a non-null value for this parameter, will throw a SecurityException if android.permission.CREDENTIAL_MANAGER_SET_ORIGIN is not present.

Throws
kotlin.NullPointerException kotlin.NullPointerException

If id is null

kotlin.NullPointerException kotlin.NullPointerException

If password is null

kotlin.IllegalArgumentException kotlin.IllegalArgumentException

If password is empty

java.lang.SecurityException java.lang.SecurityException

if android.permission.CREDENTIAL_MANAGER_SET_ORIGIN is not present

Public methods

getId

public final @NonNull String getId()

the user id associated with the password

getPassword

public final @NonNull String getPassword()

the password