Add Guardian.DB to track API tokens.

This commit is contained in:
2024-08-31 14:32:08 +03:00
parent 8697be9f17
commit 2f4fc790be
6 changed files with 54 additions and 4 deletions
@@ -0,0 +1,17 @@
defmodule LinkShortener.Repo.Migrations.CreateGuardianDBTokensTable do
use Ecto.Migration
def change do
create table(:guardian_tokens, primary_key: false) do
add(:jti, :string, primary_key: true)
add(:aud, :string, primary_key: true)
add(:typ, :string)
add(:iss, :string)
add(:sub, :string)
add(:exp, :bigint)
add(:jwt, :text)
add(:claims, :map)
timestamps()
end
end
end