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
|
# OpenID Connect Strategy
|
||||||
if Rails.configuration.omniauth.oidc_enabled
|
if Rails.configuration.omniauth.oidc_enabled
|
||||||
oidc_options = Rails.configuration.omniauth.oidc
|
|
||||||
|
|
||||||
config.omniauth(
|
config.omniauth(
|
||||||
:openid_connect,
|
:openid_connect,
|
||||||
oidc_options.merge(
|
Rails.configuration.omniauth.oidc
|
||||||
scope: oidc_options[:scope].split(',').map(&:to_sym) # Convert scope to symbol array
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -60,7 +60,9 @@ shared:
|
||||||
issuer: <%= ENV.fetch('OIDC_ISSUER', nil) %> # NEED
|
issuer: <%= ENV.fetch('OIDC_ISSUER', nil) %> # NEED
|
||||||
discovery: <%= ENV.fetch('OIDC_DISCOVERY', 'false') == 'true' %> # OPTIONAL (default: false)
|
discovery: <%= ENV.fetch('OIDC_DISCOVERY', 'false') == 'true' %> # OPTIONAL (default: false)
|
||||||
client_auth_method: <%= ENV.fetch('OIDC_CLIENT_AUTH_METHOD', nil) %> # OPTIONAL (default: basic)
|
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_type: <%= ENV.fetch('OIDC_RESPONSE_TYPE', nil) %> # OPTIONAL (default: code)
|
||||||
response_mode: <%= ENV.fetch('OIDC_RESPONSE_MODE', nil) %> # OPTIONAL (default: query)
|
response_mode: <%= ENV.fetch('OIDC_RESPONSE_MODE', nil) %> # OPTIONAL (default: query)
|
||||||
display: <%= ENV.fetch('OIDC_DISPLAY', nil) %> # OPTIONAL (default: page)
|
display: <%= ENV.fetch('OIDC_DISPLAY', nil) %> # OPTIONAL (default: page)
|
||||||
|
|
Loading…
Reference in a new issue