mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Implemented features to revoke access for previously authorized OAuth 2.0 clients
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use console\db\Migration;
|
||||
use yii\db\Expression;
|
||||
|
||||
class m200925_224423_add_oauth_sessions_last_used_at_column extends Migration {
|
||||
|
||||
public function safeUp() {
|
||||
$this->addColumn('oauth_sessions', 'last_used_at', $this->integer(11)->unsigned()->notNull());
|
||||
$this->update('oauth_sessions', [
|
||||
'last_used_at' => new Expression('`created_at`'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
$this->dropColumn('oauth_sessions', 'last_used_at');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user