Merge pull request #21917 from nextcloud/backport/21880/stable19

[stable19] Discourage webauthn user interaction
This commit is contained in:
Morris Jobke 2020-07-20 14:16:22 +02:00 committed by GitHub
commit 8e0158f064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -107,7 +107,11 @@ class Manager {
$excludedPublicKeyDescriptors = [ $excludedPublicKeyDescriptors = [
]; ];
$authenticatorSelectionCriteria = new AuthenticatorSelectionCriteria(); $authenticatorSelectionCriteria = new AuthenticatorSelectionCriteria(
null,
false,
AuthenticatorSelectionCriteria::USER_VERIFICATION_REQUIREMENT_DISCOURAGED
);
return new PublicKeyCredentialCreationOptions( return new PublicKeyCredentialCreationOptions(
$rpEntity, $rpEntity,
@ -186,7 +190,8 @@ class Manager {
random_bytes(32), // Challenge random_bytes(32), // Challenge
60000, // Timeout 60000, // Timeout
$this->stripPort($serverHost), // Relying Party ID $this->stripPort($serverHost), // Relying Party ID
$registeredPublicKeyCredentialDescriptors // Registered PublicKeyCredentialDescriptor classes $registeredPublicKeyCredentialDescriptors, // Registered PublicKeyCredentialDescriptor classes
AuthenticatorSelectionCriteria::USER_VERIFICATION_REQUIREMENT_DISCOURAGED
); );
} }