Class Extensions.CredentialProtection
- Enclosing class:
- Extensions
credProtect
) extension.- Since:
- 2.7.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Extension inputs for the Credential Protection (credProtect
) extension.static enum
Policy values for the Credential Protection (credProtect
) extension. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
validateExtensionOutput
(PublicKeyCredentialCreationOptions request, PublicKeyCredential<AuthenticatorAttestationResponse, ClientRegistrationExtensionOutputs> response) Validate that the given response satisfies thecredProtect
extension policy set in the request.
-
Constructor Details
-
CredentialProtection
public CredentialProtection()
-
-
Method Details
-
validateExtensionOutput
public static void validateExtensionOutput(PublicKeyCredentialCreationOptions request, PublicKeyCredential<AuthenticatorAttestationResponse, ClientRegistrationExtensionOutputs> response) Validate that the given response satisfies thecredProtect
extension policy set in the request.If the
credProtect
extension is not set in the request, this has no effect.If the
credProtect
extension is set in the request withenforceCredentialProtectionPolicy
set tofalse
orcredentialProtectionPolicy
set toExtensions.CredentialProtection.CredentialProtectionPolicy.UV_OPTIONAL
, this has no effect.If the
credProtect
extension is set in the request withenforceCredentialProtectionPolicy
set totrue
andcredentialProtectionPolicy
is not set toExtensions.CredentialProtection.CredentialProtectionPolicy.UV_OPTIONAL
, then this throws anIllegalArgumentException
if thecredProtect
authenticator extension output does not equal thecredentialProtectionPolicy
set in the request.This function is called automatically in
RelyingParty.finishRegistration(FinishRegistrationOptions)
; you should not need to call it yourself.- Parameters:
request
- the arguments to start the registration ceremony.response
- the response from the registration ceremony.- Throws:
IllegalArgumentException
- if thecredProtect
extension is set in the request withenforceCredentialProtectionPolicy
set totrue
andcredentialProtectionPolicy
not set toExtensions.CredentialProtection.CredentialProtectionPolicy.UV_OPTIONAL
, and thecredProtect
authenticator extension output does not equal thecredentialProtectionPolicy
set in the request.- Since:
- 2.7.0
- See Also:
-