mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
(db) distringuish between oid client configuration and client_auth_method
This commit is contained in:
parent
d4be62d0b8
commit
08ce18d93f
@ -18,14 +18,14 @@ class OpenIdConnectProvider < ApplicationRecord
|
||||
validates :prompt, inclusion: { in: %w[none login consent select_account], allow_nil: true }
|
||||
|
||||
def config
|
||||
OpenIdConnectProvider.columns.map(&:name).filter { |n| !n.start_with?('client_') && n != 'profile_url' }.map do |n|
|
||||
OpenIdConnectProvider.columns.map(&:name).filter { |n| !n.start_with?('client__') && n != 'profile_url' }.map do |n|
|
||||
[n, send(n)]
|
||||
end.push(['client_options', client_config]).to_h
|
||||
end
|
||||
|
||||
def client_config
|
||||
OpenIdConnectProvider.columns.map(&:name).filter { |n| n.start_with?('client_') }.map do |n|
|
||||
[n.sub('client_', ''), send(n)]
|
||||
OpenIdConnectProvider.columns.map(&:name).filter { |n| n.start_with?('client__') }.map do |n|
|
||||
[n.sub('client__', ''), send(n)]
|
||||
end.to_h
|
||||
end
|
||||
end
|
||||
|
@ -18,17 +18,17 @@ class CreateOpenIdConnectProviders < ActiveRecord::Migration[5.2]
|
||||
t.string :uid_field
|
||||
t.string :extra_authorize_params
|
||||
t.string :allow_authorize_params
|
||||
t.string :client_identifier
|
||||
t.string :client_secret
|
||||
t.string :client_redirect_uri
|
||||
t.string :client_scheme
|
||||
t.string :client_host
|
||||
t.string :client_port
|
||||
t.string :client_authorization_endpoint
|
||||
t.string :client_token_endpoint
|
||||
t.string :client_userinfo_endpoint
|
||||
t.string :client_jwks_uri
|
||||
t.string :client_end_session_endpoint
|
||||
t.string :client__identifier
|
||||
t.string :client__secret
|
||||
t.string :client__redirect_uri
|
||||
t.string :client__scheme
|
||||
t.string :client__host
|
||||
t.string :client__port
|
||||
t.string :client__authorization_endpoint
|
||||
t.string :client__token_endpoint
|
||||
t.string :client__userinfo_endpoint
|
||||
t.string :client__jwks_uri
|
||||
t.string :client__end_session_endpoint
|
||||
t.string :profile_url
|
||||
|
||||
t.timestamps
|
||||
|
22
db/schema.rb
22
db/schema.rb
@ -425,17 +425,17 @@ ActiveRecord::Schema.define(version: 2022_03_28_145017) do
|
||||
t.string "uid_field"
|
||||
t.string "extra_authorize_params"
|
||||
t.string "allow_authorize_params"
|
||||
t.string "client_identifier"
|
||||
t.string "client_secret"
|
||||
t.string "client_redirect_uri"
|
||||
t.string "client_scheme"
|
||||
t.string "client_host"
|
||||
t.string "client_port"
|
||||
t.string "client_authorization_endpoint"
|
||||
t.string "client_token_endpoint"
|
||||
t.string "client_userinfo_endpoint"
|
||||
t.string "client_jwks_uri"
|
||||
t.string "client_end_session_endpoint"
|
||||
t.string "client__identifier"
|
||||
t.string "client__secret"
|
||||
t.string "client__redirect_uri"
|
||||
t.string "client__scheme"
|
||||
t.string "client__host"
|
||||
t.string "client__port"
|
||||
t.string "client__authorization_endpoint"
|
||||
t.string "client__token_endpoint"
|
||||
t.string "client__userinfo_endpoint"
|
||||
t.string "client__jwks_uri"
|
||||
t.string "client__end_session_endpoint"
|
||||
t.string "profile_url"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
|
Loading…
Reference in New Issue
Block a user