mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-28 02:00:06 +00:00
OATHUserRepository: Stop handling legacy single-key
Migration is handled by UpdateTables::switchTOTPToMultipleKeys() The transition has been completed at WMF as well. Bug: T304375 Change-Id: I0e6d30075dfbd66d692cd8a5e3f7c9ebf44bc065
This commit is contained in:
parent
1ee5f486d6
commit
6898d6ba93
|
@ -95,11 +95,7 @@ class OATHUserRepository {
|
|||
|
||||
$oathUser->setModule( $module );
|
||||
$decodedData = FormatJson::decode( $res->data, true );
|
||||
if ( !isset( $decodedData['keys'] ) && $module->getName() === 'totp' ) {
|
||||
// Legacy single-key setup
|
||||
$key = $module->newKey( $decodedData );
|
||||
$oathUser->addKey( $key );
|
||||
} elseif ( is_array( $decodedData['keys'] ) ) {
|
||||
if ( is_array( $decodedData['keys'] ) ) {
|
||||
foreach ( $decodedData['keys'] as $keyData ) {
|
||||
$key = $module->newKey( $keyData );
|
||||
$oathUser->addKey( $key );
|
||||
|
|
Loading…
Reference in a new issue