Skip to content

Commit 1f271ab

Browse files
committed
Remove deprecated U2F logic (Webauthn should be used)
1 parent 29fcdee commit 1f271ab

4 files changed

Lines changed: 3 additions & 9 deletions

File tree

config/users.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@
136136
// Random Number Generator provider (more on this later)
137137
'rngprovider' => null,
138138
],
139-
'U2f' => [
140-
'enabled' => false,
141-
'checker' => \CakeDC\Auth\Authentication\DefaultU2fAuthenticationChecker::class,
142-
],
143139
'Webauthn2fa' => [
144140
'enabled' => false,
145141
'appName' => null,//App must set a valid name here

src/Utility/UsersUrl.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ private static function getDefaultConfigUrls()
123123
return [
124124
'Users.Profile.route' => static::actionUrl('profile'),
125125
'OneTimePasswordAuthenticator.verifyAction' => static::actionUrl('verify'),
126-
'U2f.startAction' => static::actionUrl('u2f'),
127126
'Webauthn2fa.startAction' => static::actionUrl('webauthn2fa'),
128127
'Auth.AuthenticationComponent.loginAction' => $loginAction,
129128
'Auth.AuthenticationComponent.logoutRedirect' => $loginAction,

tests/TestCase/Controller/Traits/Integration/LoginTraitIntegrationTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,17 +205,17 @@ public function testLoginPostRequestRightPasswordIsEnabledOTP()
205205
*
206206
* @return void
207207
*/
208-
public function testLoginPostRequestRightPasswordIsEnabledU2f()
208+
public function testLoginPostRequestRightPasswordIsEnabledWebauthn2fa()
209209
{
210210
EventManager::instance()->on('TestApp.afterPluginBootstrap', function () {
211-
Configure::write(['U2f.enabled' => true]);
211+
Configure::write(['Webauthn2fa.enabled' => true, 'Webauthn2fa.appName' => 'TestUsers']);
212212
});
213213
$this->enableRetainFlashMessages();
214214
$this->post('/login', [
215215
'username' => 'user-2',
216216
'password' => '12345',
217217
]);
218-
$this->assertRedirectContains('/users/u2f');
218+
$this->assertRedirectContains('/users/webauthn2fa');
219219
}
220220

221221
/**

tests/TestCase/PluginTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ public function dataProviderConfigUsersUrls()
253253
return [
254254
['Users.Profile.route', $defaultProfileAction],
255255
['OneTimePasswordAuthenticator.verifyAction', $defaultVerifyAction],
256-
['U2f.startAction', $defaultU2fStartAction],
257256
['Auth.AuthenticationComponent.loginAction', $defaultLoginAction],
258257
['Auth.AuthenticationComponent.logoutRedirect', $defaultLoginAction],
259258
['Auth.AuthenticationComponent.loginRedirect', '/'],

0 commit comments

Comments
 (0)