Skip to content

Commit a0eedd6

Browse files
mberlandasuprnova32
authored andcommitted
feat(saml): inherits allows response options from ruby-saml instead of whitelist
1 parent 91f1282 commit a0eedd6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/omniauth/strategies/saml.rb

+2-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ def self.inherited(subclass)
1010
OmniAuth::Strategy.included(subclass)
1111
end
1212

13-
OTHER_REQUEST_OPTIONS = [
14-
:skip_conditions, :allowed_clock_drift, :matches_request_id,
15-
:skip_subject_confirmation, :skip_destination, :skip_recipient_check
16-
].freeze
13+
RUBYSAML_RESPONSE_OPTIONS = OneLogin::RubySaml::Response::AVAILABLE_OPTIONS
1714

1815
option :name_identifier_format, nil
1916
option :idp_sso_target_url_runtime_params, {}
@@ -234,7 +231,7 @@ def validate_fingerprint(settings)
234231

235232
def options_for_response_object
236233
# filter options to select only extra parameters
237-
opts = options.select {|k,_| OTHER_REQUEST_OPTIONS.include?(k.to_sym)}
234+
opts = options.select {|k,_| RUBYSAML_RESPONSE_OPTIONS.include?(k.to_sym)}
238235

239236
# symbolize keys without activeSupport/symbolize_keys (ruby-saml use symbols)
240237
opts.inject({}) do |new_hash, (key, value)|

0 commit comments

Comments
 (0)