Implement access token authentication

Add whoami endpoint
This commit is contained in:
Pim Kunis 2021-06-26 00:29:33 +02:00
parent d81a42bf8a
commit dac1a429b9
8 changed files with 96 additions and 4 deletions

View file

@ -13,6 +13,7 @@ defmodule MatrixServer.Repo.Migrations.AddDevicesTable do
null: false
end
# Compound primary already indexes device_id.
create index(:devices, [:localpart])
end
end

View file

@ -0,0 +1,7 @@
defmodule MatrixServer.Repo.Migrations.AddAccessTokenIndexToDevices do
use Ecto.Migration
def change do
create index(:devices, [:access_token], unique: true)
end
end