mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Read oidc scope as yaml symbol array
This commit is contained in:
parent
7fbaaf9fab
commit
ce31e0dee1
2 changed files with 4 additions and 6 deletions
|
@ -27,13 +27,9 @@ Devise.setup do |config|
|
|||
|
||||
# OpenID Connect Strategy
|
||||
if Rails.configuration.omniauth.oidc_enabled
|
||||
oidc_options = Rails.configuration.omniauth.oidc
|
||||
|
||||
config.omniauth(
|
||||
:openid_connect,
|
||||
oidc_options.merge(
|
||||
scope: oidc_options[:scope].split(',').map(&:to_sym) # Convert scope to symbol array
|
||||
)
|
||||
Rails.configuration.omniauth.oidc
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -60,7 +60,9 @@ shared:
|
|||
issuer: <%= ENV.fetch('OIDC_ISSUER', nil) %> # NEED
|
||||
discovery: <%= ENV.fetch('OIDC_DISCOVERY', 'false') == 'true' %> # OPTIONAL (default: false)
|
||||
client_auth_method: <%= ENV.fetch('OIDC_CLIENT_AUTH_METHOD', nil) %> # OPTIONAL (default: basic)
|
||||
scope: <%= ENV.fetch('OIDC_SCOPE', '') %>
|
||||
scope: <% ENV.fetch('OIDC_SCOPE', '').split(',').each do |value| %>
|
||||
- !ruby/symbol <%= value %>
|
||||
<% end %>
|
||||
response_type: <%= ENV.fetch('OIDC_RESPONSE_TYPE', nil) %> # OPTIONAL (default: code)
|
||||
response_mode: <%= ENV.fetch('OIDC_RESPONSE_MODE', nil) %> # OPTIONAL (default: query)
|
||||
display: <%= ENV.fetch('OIDC_DISPLAY', nil) %> # OPTIONAL (default: page)
|
||||
|
|
Loading…
Reference in a new issue