SignalUnknownCredentialRequest


class SignalUnknownCredentialRequest : SignalCredentialStateRequest


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

Summary

Public constructors

Constructs a request to signal that a credential ID is not recognized by the calling app.

@RequiresPermission(value = "android.permission.CREDENTIAL_MANAGER_SET_ORIGIN", conditional = true)
SignalUnknownCredentialRequest(requestJson: String, origin: String?)

Constructs a request to signal that a credential ID is not recognized by the calling app.

Inherited properties

From androidx.credentials.SignalCredentialStateRequest
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)

Bundle

the bundle to contain the request json and any additional info

String

the signal request data in the expected json format

String

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

Public constructors

SignalUnknownCredentialRequest

Added in 1.6.0-beta01
SignalUnknownCredentialRequest(requestJson: String)

Constructs a request to signal that a credential ID is not recognized by the calling app.

Parameters
requestJson: String

the request in JSON format. The format of the JSON should follow the WebAuthn Spec. Throws SignalCredentialStateException if base64Url decoding fails for the credential id

SignalUnknownCredentialRequest

Added in 1.6.0-beta01
@RequiresPermission(value = "android.permission.CREDENTIAL_MANAGER_SET_ORIGIN", conditional = true)
SignalUnknownCredentialRequest(requestJson: String, origin: String?)

Constructs a request to signal that a credential ID is not recognized by the calling app.

Parameters
requestJson: String

the request in JSON format. The format of the JSON should follow the WebAuthn Spec. Throws SignalCredentialStateException if base64Url decoding fails for the credential id

origin: String?

the origin of a different application if the request is being made on behalf of that application, to be used only by browsers or privileged apps recognized by the target credential provider (Note: if a non-browser/non-privileged app sets an origin, it will be rejected across all API levels, and for API level >=34, the calling party must also have the android.permission.CREDENTIAL_MANAGER_SET_ORIGIN permission otherwise a SecurityException will be thrown)

Throws
kotlin.IllegalArgumentException

if request json validation fails

androidx.credentials.exceptions.publickeycredential.SignalCredentialSecurityException

if origin is set without having android.permission.CREDENTIAl_MANAGER_SET_ORIGIN