mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-26 20:54:21 +01:00
(bug) unable to save OpenID extra_authorize_params as json
This commit is contained in:
parent
8833fe593a
commit
2c7a37f770
@ -5,6 +5,7 @@
|
|||||||
- Fix a bug: fix ReservationReminderWorker, was sending reservation reminder to users with a event reservation not validated by admin + adds tests for all scenarios
|
- Fix a bug: fix ReservationReminderWorker, was sending reservation reminder to users with a event reservation not validated by admin + adds tests for all scenarios
|
||||||
- Fix a bug: admin could not create new SupportingDocumentType (problem was on js side)
|
- Fix a bug: admin could not create new SupportingDocumentType (problem was on js side)
|
||||||
- Fix a bug: fix back button on space edit page
|
- Fix a bug: fix back button on space edit page
|
||||||
|
- Fix a bug: unable to save OpenID extra_authorize_params as json
|
||||||
|
|
||||||
## v6.1.2 2023 October 2
|
## v6.1.2 2023 October 2
|
||||||
|
|
||||||
|
@ -16,4 +16,16 @@ class OpenIdConnectProvider < ApplicationRecord
|
|||||||
validates :display, inclusion: { in: %w[page popup touch wap], allow_nil: true }
|
validates :display, inclusion: { in: %w[page popup touch wap], allow_nil: true }
|
||||||
validates :prompt, inclusion: { in: %w[none login consent select_account], allow_nil: true }
|
validates :prompt, inclusion: { in: %w[none login consent select_account], allow_nil: true }
|
||||||
validates :client_auth_method, inclusion: { in: %w[basic jwks] }
|
validates :client_auth_method, inclusion: { in: %w[basic jwks] }
|
||||||
|
store_accessor :extra_authorize_params
|
||||||
|
|
||||||
|
def extra_authorize_params=(val)
|
||||||
|
return unless val.is_a?(String)
|
||||||
|
|
||||||
|
begin
|
||||||
|
super JSON.parse(val)
|
||||||
|
rescue JSON::ParserError
|
||||||
|
errors[:extra_authorize_params].add('is not valid JSON')
|
||||||
|
super
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -16,6 +16,6 @@ if @provider.providable_type == OpenIdConnectProvider.name
|
|||||||
:prompt, :send_scope_to_token_endpoint, :client__identifier, :client__secret, :client__authorization_endpoint,
|
:prompt, :send_scope_to_token_endpoint, :client__identifier, :client__secret, :client__authorization_endpoint,
|
||||||
:client__token_endpoint, :client__userinfo_endpoint, :client__jwks_uri, :client__end_session_endpoint, :profile_url
|
:client__token_endpoint, :client__userinfo_endpoint, :client__jwks_uri, :client__end_session_endpoint, :profile_url
|
||||||
json.scope @provider.providable[:scope]
|
json.scope @provider.providable[:scope]
|
||||||
json.extra_authorize_params @provider.providable[:extra_authorize_params]
|
json.extra_authorize_params @provider.providable[:extra_authorize_params].to_json
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user