Merge pull request #21880 from nextcloud/webauthn/discourage_user_auth

Discourage webauthn user interaction
This commit is contained in:
Morris Jobke 2020-07-20 09:24:08 +02:00 committed by GitHub
commit 9271d65641
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
); );
} }