ResidentKeyRequirement
Stay organized with collections
Save and categorize content based on your preferences.
An enum that describes the Resident Key (Discoverable Credential) requirements.
According to WebAuthn, this structure describes the Relying Party's requirements for
client-side discoverable credentials (formerly known as resident credentials or resident
keys):
If the resident key requirement is set to "required", then the Relying Party requires a
client-side discoverable credential and is prepared to receive an error if it can't be
created. If the resident key requirement is set to "preferred", the Relying party strongly
prefers a client-side discoverable credential but will accept a server-side credential. If
the resident key requirement is set to "discouraged" then a server-side credential is
preferable, but will accept a client-side discoverable credential.
See Resident Key
Requirement Enumeration
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Inherited Method Summary
From class java.lang.Enum
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
From interface java.lang.constant.Constable
abstract Optional<? extends ConstantDesc>
|
describeConstable()
|
From interface java.lang.Comparable
From interface android.os.Parcelable
abstract int |
describeContents()
|
abstract void |
writeToParcel( Parcel arg0,
int arg1)
|
Enum Values
public static final
ResidentKeyRequirement RESIDENT_KEY_DISCOURAGED
public static final
ResidentKeyRequirement RESIDENT_KEY_PREFERRED
public static final
ResidentKeyRequirement RESIDENT_KEY_REQUIRED
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eResidentKeyRequirement\u003c/code\u003e is an enum defining Relying Party's requirements for client-side discoverable credentials (resident keys) in WebAuthn.\u003c/p\u003e\n"],["\u003cp\u003eIt has three values: \u003ccode\u003eRESIDENT_KEY_REQUIRED\u003c/code\u003e, \u003ccode\u003eRESIDENT_KEY_PREFERRED\u003c/code\u003e, and \u003ccode\u003eRESIDENT_KEY_DISCOURAGED\u003c/code\u003e, indicating the level of preference for resident keys.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eUnsupportedResidentKeyRequirementException\u003c/code\u003e is thrown when an unsupported resident key requirement is encountered.\u003c/p\u003e\n"],["\u003cp\u003eThis enum implements \u003ccode\u003eParcelable\u003c/code\u003e for passing data between components, and inherits methods from \u003ccode\u003eEnum\u003c/code\u003e, \u003ccode\u003eObject\u003c/code\u003e, \u003ccode\u003eConstable\u003c/code\u003e, and \u003ccode\u003eComparable\u003c/code\u003e.\u003c/p\u003e\n"]]],["`ResidentKeyRequirement` is an enum defining preferences for client-side discoverable credentials. It has three possible values: `RESIDENT_KEY_REQUIRED`, meaning a client-side credential is required; `RESIDENT_KEY_PREFERRED`, where a client-side credential is strongly preferred but a server-side one is acceptable; and `RESIDENT_KEY_DISCOURAGED`, indicating server-side credentials are preferred, but client-side credentials are still accepted. It implements `Parcelable` and includes a nested exception `UnsupportedResidentKeyRequirementException`. An exception will be thrown when an unsupported requirement is encountered.\n"],null,["# ResidentKeyRequirement\n\npublic final enum **ResidentKeyRequirement** extends [Enum](//developer.android.com/reference/java/lang/Enum.html)\\\u003c[ResidentKeyRequirement](/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement)\\\u003e \nimplements [Parcelable](//developer.android.com/reference/android/os/Parcelable.html) \nAn enum that describes the Resident Key (Discoverable Credential) requirements.\n\nAccording to WebAuthn, this structure describes the Relying Party's requirements for\nclient-side discoverable credentials (formerly known as resident credentials or resident\nkeys):\n\nIf the resident key requirement is set to \"required\", then the Relying Party requires a\nclient-side discoverable credential and is prepared to receive an error if it can't be\ncreated. If the resident key requirement is set to \"preferred\", the Relying party strongly\nprefers a client-side discoverable credential but will accept a server-side credential. If\nthe resident key requirement is set to \"discouraged\" then a server-side credential is\npreferable, but will accept a client-side discoverable credential.\n\nSee [Resident Key\nRequirement Enumeration](/android/reference/com/google/android/gms/fido/fido2/api/common/www.w3.org/TR/webauthn-2#enum-residentKeyRequirement) \n\n### Nested Class Summary\n\n|-------|---|---|-----------------------------------------------------------------------------------------------|\n| class | [ResidentKeyRequirement.UnsupportedResidentKeyRequirementException](/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement.UnsupportedResidentKeyRequirementException) || Exception thrown when an unsupported or unrecognized resident key requirement is encountered. |\n\n### Inherited Constant Summary\n\nFrom interface android.os.Parcelable \n\n|-----|-------------------------------|---|\n| int | CONTENTS_FILE_DESCRIPTOR | |\n| int | PARCELABLE_WRITE_RETURN_VALUE | |\n\n### Inherited Method Summary\n\nFrom class java.lang.Enum \n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| final [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| final int | compareTo([ResidentKeyRequirement](/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement) arg0) |\n| int | compareTo([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| final [Optional](//developer.android.com/reference/java/util/Optional.html)\\\u003cEnumDesc\\\u003c[ResidentKeyRequirement](/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement)\\\u003e\\\u003e | describeConstable() |\n| final boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| final void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c[ResidentKeyRequirement](/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement)\\\u003e | getDeclaringClass() |\n| final int | hashCode() |\n| final [String](//developer.android.com/reference/java/lang/String.html) | name() |\n| final int | ordinal() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| static \\\u003cT extends [Enum](//developer.android.com/reference/java/lang/Enum.html)\\\u003cT\\\u003e\\\u003e T | valueOf([Class](//developer.android.com/reference/java/lang/Class.html)\\\u003cT\\\u003e arg0, [String](//developer.android.com/reference/java/lang/String.html) arg1) |\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface java.lang.constant.Constable \n\n|----------------------------------------------------------------------------------------------------------|---------------------|\n| abstract [Optional](//developer.android.com/reference/java/util/Optional.html)\\\u003c? extends ConstantDesc\\\u003e | describeConstable() |\n\nFrom interface java.lang.Comparable \n\n|--------------|----------------------------------------------------------------------------------------------------------------------------------|\n| abstract int | compareTo([ResidentKeyRequirement](/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement) arg0) |\n\nFrom interface android.os.Parcelable \n\n|---------------|--------------------------------------------------------------------------------------------------|\n| abstract int | describeContents() |\n| abstract void | writeToParcel([Parcel](//developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |\n\nEnum Values\n-----------\n\n#### public static final ResidentKeyRequirement **RESIDENT_KEY_DISCOURAGED**\n\n#### public static final ResidentKeyRequirement **RESIDENT_KEY_PREFERRED**\n\n#### public static final ResidentKeyRequirement **RESIDENT_KEY_REQUIRED**"]]