Implement access token authentication
Add whoami endpoint
This commit is contained in:
parent
d81a42bf8a
commit
dac1a429b9
8 changed files with 96 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue