@@ -84,13 +84,13 @@ discard block |
||
| 84 | 84 | public function startRegistration(IUser $user, string $serverHost): PublicKeyCredentialCreationOptions { |
| 85 | 85 | $rpEntity = new PublicKeyCredentialRpEntity( |
| 86 | 86 | 'Nextcloud', //Name |
| 87 | - $this->stripPort($serverHost), //ID |
|
| 87 | + $this->stripPort($serverHost), //ID |
|
| 88 | 88 | null //Icon |
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | 91 | $userEntity = new PublicKeyCredentialUserEntity( |
| 92 | - $user->getUID(), //Name |
|
| 93 | - $user->getUID(), //ID |
|
| 92 | + $user->getUID(), //Name |
|
| 93 | + $user->getUID(), //ID |
|
| 94 | 94 | $user->getDisplayName() //Display name |
| 95 | 95 | // 'https://foo.example.co/avatar/123e4567-e89b-12d3-a456-426655440000' //Icon |
| 96 | 96 | ); |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | |
| 178 | 178 | public function startAuthentication(string $uid, string $serverHost): PublicKeyCredentialRequestOptions { |
| 179 | 179 | // List of registered PublicKeyCredentialDescriptor classes associated to the user |
| 180 | - $registeredPublicKeyCredentialDescriptors = array_map(function (PublicKeyCredentialEntity $entity) { |
|
| 180 | + $registeredPublicKeyCredentialDescriptors = array_map(function(PublicKeyCredentialEntity $entity) { |
|
| 181 | 181 | $credential = $entity->toPublicKeyCredentialSource(); |
| 182 | 182 | return new PublicKeyCredentialDescriptor( |
| 183 | 183 | $credential->getType(), |
@@ -187,10 +187,10 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | // Public Key Credential Request Options |
| 189 | 189 | return new PublicKeyCredentialRequestOptions( |
| 190 | - random_bytes(32), // Challenge |
|
| 191 | - 60000, // Timeout |
|
| 192 | - $this->stripPort($serverHost), // Relying Party ID |
|
| 193 | - $registeredPublicKeyCredentialDescriptors, // Registered PublicKeyCredentialDescriptor classes |
|
| 190 | + random_bytes(32), // Challenge |
|
| 191 | + 60000, // Timeout |
|
| 192 | + $this->stripPort($serverHost), // Relying Party ID |
|
| 193 | + $registeredPublicKeyCredentialDescriptors, // Registered PublicKeyCredentialDescriptor classes |
|
| 194 | 194 | AuthenticatorSelectionCriteria::USER_VERIFICATION_REQUIREMENT_DISCOURAGED |
| 195 | 195 | ); |
| 196 | 196 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | ); |
| 217 | 217 | |
| 218 | 218 | try { |
| 219 | - $this->logger->debug('Loading publickey credentials from: ' . $data); |
|
| 219 | + $this->logger->debug('Loading publickey credentials from: '.$data); |
|
| 220 | 220 | |
| 221 | 221 | // Load the data |
| 222 | 222 | $publicKeyCredential = $publicKeyCredentialLoader->load($data); |