Class Extensions.CredentialProtection
- Enclosing class:
- Extensions
credProtect) extension.- Since:
- 2.7.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classExtension inputs for the Credential Protection (credProtect) extension.static enumPolicy values for the Credential Protection (credProtect) extension. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvalidateExtensionOutput(PublicKeyCredentialCreationOptions request, PublicKeyCredential<AuthenticatorAttestationResponse, ClientRegistrationExtensionOutputs> response) Validate that the given response satisfies thecredProtectextension 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 thecredProtectextension policy set in the request.If the
credProtectextension is not set in the request, this has no effect.If the
credProtectextension is set in the request withenforceCredentialProtectionPolicyset tofalseorcredentialProtectionPolicyset toExtensions.CredentialProtection.CredentialProtectionPolicy.UV_OPTIONAL, this has no effect.If the
credProtectextension is set in the request withenforceCredentialProtectionPolicyset totrueandcredentialProtectionPolicyis not set toExtensions.CredentialProtection.CredentialProtectionPolicy.UV_OPTIONAL, then this throws anIllegalArgumentExceptionif thecredProtectauthenticator extension output does not equal thecredentialProtectionPolicyset 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 thecredProtectextension is set in the request withenforceCredentialProtectionPolicyset totrueandcredentialProtectionPolicynot set toExtensions.CredentialProtection.CredentialProtectionPolicy.UV_OPTIONAL, and thecredProtectauthenticator extension output does not equal thecredentialProtectionPolicyset in the request.- Since:
- 2.7.0
- See Also:
-