Packages
boruta
2.1.2
3.0.0-beta.4
3.0.0-beta.3
3.0.0-beta.2
3.0.0-beta.1
2.3.6
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.2
2.2.1
2.2.0
2.1.5
2.1.4
2.1.3
2.1.2
2.1.1
2.1.0
2.0.1
2.0.0
2.0.0-rc.1
2.0.0-rc.0
1.2.1
1.2.0
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0
1.0.0-rc.3
1.0.0-rc.2
1.0.0-rc.1
1.0.0-rc.0
0.2.1
0.2.0
0.1.1
0.1.0
0.1.0-rc.5
0.1.0-rc.4
0.1.0-rc.3
0.1.0-rc.2
0.1.0-rc.1
Core of an OAuth/OpenID Connect provider enabling authorization in your applications.
Current section
Files
Jump to
Current section
Files
priv/repo/migrations/20210824204150_add_oauth_prefix.exs
defmodule Boruta.Repo.Migrations.AddOauthPrefix do
use Ecto.Migration
def change do
drop(unique_index(:clients, [:id, :secret]))
drop(index(:tokens, [:value]))
drop(unique_index(:tokens, [:client_id, :value]))
drop(unique_index(:tokens, [:client_id, :refresh_token]))
drop(unique_index(:scopes, [:name]))
rename(table(:tokens), to: table(:oauth_tokens))
rename(table(:clients), to: table(:oauth_clients))
rename(table(:scopes), to: table(:oauth_scopes))
rename(table(:clients_scopes), to: table(:oauth_clients_scopes))
alter table(:oauth_clients_scopes) do
modify(:client_id, references(:oauth_clients, type: :uuid, on_delete: :delete_all))
modify(:scope_id, references(:oauth_scopes, type: :uuid, on_delete: :delete_all))
end
alter table(:oauth_tokens) do
modify(:client_id, references(:oauth_clients, type: :uuid, on_delete: :nilify_all))
end
create(unique_index(:oauth_clients, [:id, :secret]))
create(index(:oauth_tokens, [:value]))
create(unique_index(:oauth_tokens, [:client_id, :value]))
create(unique_index(:oauth_tokens, [:client_id, :refresh_token]))
create(unique_index(:oauth_scopes, [:name]))
end
end