Class PublicKeyCredentialHint
For example, the SECURITY_KEY
hint may be used to ask the
client to emphasize the option of using an external security key, or the CLIENT_DEVICE
hint may be used to ask the client to emphasize the option
of using a built-in passkey provider.
These hints are not requirements, and do not bind the user-agent, but may guide it in providing the best experience by using contextual information about the request.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PublicKeyCredentialHint
Indicates that the application believes that users will satisfy this request with an authenticator built into the client device.static final PublicKeyCredentialHint
Indicates that the application believes that users will satisfy this request with general-purpose authenticators such as smartphones.static final PublicKeyCredentialHint
Indicates that the application believes that users will satisfy this request with a physical security key. -
Method Summary
Modifier and TypeMethodDescriptionboolean
@NonNull String
getValue()
int
hashCode()
static PublicKeyCredentialHint
toString()
static PublicKeyCredentialHint
static PublicKeyCredentialHint[]
values()
-
Field Details
-
SECURITY_KEY
Indicates that the application believes that users will satisfy this request with a physical security key.For example, an enterprise application may set this hint if they have issued security keys to their employees and will only accept those authenticators for registration and authentication. In that case, the application should probably also set
attestationTrustSource
and setallowUntrustedAttestation
tofalse
. See also thewebauthn-server-attestation
module.For compatibility with older user agents, when this hint is used in
StartRegistrationOptions
, theauthenticatorSelection
.authenticatorAttachment
AuthenticatorAttachment.CROSS_PLATFORM
.- See Also:
-
StartRegistrationOptions.StartRegistrationOptionsBuilder.hints(PublicKeyCredentialHint...)
StartAssertionOptions.StartAssertionOptionsBuilder.hints(PublicKeyCredentialHint...)
-
security-key
in §5.8.7. User-agent Hints Enumeration (enum PublicKeyCredentialHints) - §5.8.7. User-agent Hints Enumeration (enum PublicKeyCredentialHints)
-
CLIENT_DEVICE
Indicates that the application believes that users will satisfy this request with an authenticator built into the client device.For compatibility with older user agents, when this hint is used in
StartRegistrationOptions
, theauthenticatorSelection
.authenticatorAttachment
AuthenticatorAttachment.PLATFORM
.- See Also:
-
StartRegistrationOptions.StartRegistrationOptionsBuilder.hints(PublicKeyCredentialHint...)
StartAssertionOptions.StartAssertionOptionsBuilder.hints(PublicKeyCredentialHint...)
-
client-device
in §5.8.7. User-agent Hints Enumeration (enum PublicKeyCredentialHints) - §5.8.7. User-agent Hints Enumeration (enum PublicKeyCredentialHints)
-
HYBRID
Indicates that the application believes that users will satisfy this request with general-purpose authenticators such as smartphones. For example, a consumer application may believe that only a small fraction of their customers possesses dedicated security keys. This option also implies that the local platform authenticator should not be promoted in the UI.For compatibility with older user agents, when this hint is used in
StartRegistrationOptions
, theauthenticatorSelection
.authenticatorAttachment
AuthenticatorAttachment.CROSS_PLATFORM
.- See Also:
-
StartRegistrationOptions.StartRegistrationOptionsBuilder.hints(PublicKeyCredentialHint...)
StartAssertionOptions.StartAssertionOptionsBuilder.hints(PublicKeyCredentialHint...)
-
hybrid
in §5.8.7. User-agent Hints Enumeration (enum PublicKeyCredentialHints) - §5.8.7. User-agent Hints Enumeration (enum PublicKeyCredentialHints)
-
-
Method Details
-
values
- Returns:
- An array containing all predefined values of
PublicKeyCredentialHint
known by this implementation.
-
of
- Returns:
- If
value
is the same as that of any ofSECURITY_KEY
,CLIENT_DEVICE
orHYBRID
, returns that constant instance. Otherwise returns a new instance containingvalue
. - See Also:
-
valueOf
- Returns:
- If
name
equals"SECURITY_KEY"
,"CLIENT_DEVICE"
or"HYBRID"
, returns the constant by that name. - Throws:
IllegalArgumentException
- ifname
is anything else.- See Also:
-
getValue
-
equals
-
hashCode
public int hashCode() -
toString
-