Базовая версия клиента авторизации по протоколу OAuth2

This commit is contained in:
Andrey Pokidov
2020-02-27 13:10:22 +07:00
commit 12b74a2bf1
86 changed files with 8992 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\OAuth2User;
class OauthUser extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(OAuth2User::TABLE_NAME, function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('email')->unique();
$table->string('name');
$table->string('patronymic');
$table->string('lastname');
$table->text('access_token');
$table->text('refresh_token');
$table->rememberToken();
$table->timestamps();
$table->timestamp('expires_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists(OAuth2User::TABLE_NAME);
}
}