SignalCredentialStateRequest


public abstract class SignalCredentialStateRequest

Known direct subclasses
SignalAllAcceptedCredentialIdsRequest

A request to signal the complete list of public key credentials ids for a given user.

SignalCurrentUserDetailsRequest

A request to signal the user's current name and display name.

SignalUnknownCredentialRequest

A request to signal that a credential ID was not recognized by the relying party.


Base request class for sending credential state signals to providers.

An application can construct a subtype request and call CredentialManager.signalCredentialState to propagate a signal credential state request.

Summary

Public methods

static final @NonNull SignalCredentialStateRequest
createFrom(
    @NonNull String requestType,
    @NonNull String requestJson,
    String origin
)

Creates a SignalCredentialStateRequest from the given parameters.

final String

the origin of a different application if the request is being made on behalf of that application (Note: 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)

final @NonNull Bundle

the bundle to contain the request json and any additional info

final @NonNull String

the signal request data in the expected json format

final @NonNull String

the request type representing one of SignalAllAcceptedCredentialIdsRequest, SignalCurrentUserDetailsRequest and SignalUnknownCredentialRequest)

Public methods

createFrom

Added in 1.6.0-beta01
public static final @NonNull SignalCredentialStateRequest createFrom(
    @NonNull String requestType,
    @NonNull String requestJson,
    String origin
)

Creates a SignalCredentialStateRequest from the given parameters.

Parameters
@NonNull String requestType

the request type representing one of SignalAllAcceptedCredentialIdsRequest, SignalCurrentUserDetailsRequest and SignalUnknownCredentialRequest)

@NonNull String requestJson

the request json corresponding to the request data

String origin

the origin of a different application if the request is being made on behalf of that application (Note: 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 IllegalArgumentException if request json validation fails @throws SignalCredentialSecurityException if origin is set without having android.permission.CREDENTIAl_MANAGER_SET_ORIGIN

getOrigin

Added in 1.6.0-beta01
public final String getOrigin()

the origin of a different application if the request is being made on behalf of that application (Note: 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)

getRequestData

Added in 1.6.0-beta01
public final @NonNull Bundle getRequestData()

the bundle to contain the request json and any additional info

getRequestJson

Added in 1.6.0-beta01
public final @NonNull String getRequestJson()

the signal request data in the expected json format

getType

Added in 1.6.0-beta01
public final @NonNull String getType()

the request type representing one of SignalAllAcceptedCredentialIdsRequest, SignalCurrentUserDetailsRequest and SignalUnknownCredentialRequest)