Fix tests - add missing files
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class AddPkceOptionsToApplications < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
# Add require_pkce column for confidential clients
|
||||
# Default true for new apps (secure by default), existing apps will be false
|
||||
add_column :applications, :require_pkce, :boolean, default: true, null: false
|
||||
|
||||
# Set existing applications to not require PKCE (backwards compatibility)
|
||||
reversible do |dir|
|
||||
dir.up do
|
||||
execute "UPDATE applications SET require_pkce = false WHERE id > 0"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,20 @@
|
||||
class RenameCodeToCodeHmacAndAddTokenHmac < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
# Authorization codes: rename code to code_hmac
|
||||
rename_column :oidc_authorization_codes, :code, :code_hmac
|
||||
|
||||
# Access tokens: add token_hmac, remove old columns
|
||||
add_column :oidc_access_tokens, :token_hmac, :string
|
||||
add_index :oidc_access_tokens, :token_hmac, unique: true
|
||||
|
||||
remove_column :oidc_access_tokens, :token_prefix
|
||||
remove_column :oidc_access_tokens, :token_digest
|
||||
|
||||
# Refresh tokens: add token_hmac, remove old columns
|
||||
add_column :oidc_refresh_tokens, :token_hmac, :string
|
||||
add_index :oidc_refresh_tokens, :token_hmac, unique: true
|
||||
|
||||
remove_column :oidc_refresh_tokens, :token_prefix
|
||||
remove_column :oidc_refresh_tokens, :token_digest
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user