added support for legacy tickets, fixed switching of modes and also style updates
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
+50
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('helpdesk_native_authorization_codes', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('user_id')
|
||||
->constrained('users')
|
||||
->cascadeOnDelete();
|
||||
|
||||
$table->string('client_id', 100);
|
||||
|
||||
// Store only the SHA-256 hash of the authorization code.
|
||||
$table->char('code_hash', 64)->unique();
|
||||
|
||||
// Exact registered callback URI for this authorization attempt.
|
||||
$table->string('redirect_uri', 2048);
|
||||
|
||||
// PKCE S256 challenge (base64url encoded).
|
||||
$table->string('code_challenge', 128);
|
||||
|
||||
$table->string('code_challenge_method', 10)
|
||||
->default('S256');
|
||||
|
||||
$table->timestamp('expires_at');
|
||||
|
||||
// Set atomically when the code is redeemed.
|
||||
$table->timestamp('consumed_at')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['client_id', 'expires_at']);
|
||||
$table->index(['user_id', 'created_at']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('helpdesk_native_authorization_codes');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user