Skip to content

Commit

Permalink
Merge pull request #35 from tomhipkin/hotfix/ruby-saml-update
Browse files Browse the repository at this point in the history
Bump ruby-saml to version 0.8.1
  • Loading branch information
bpedro committed Jan 23, 2015
2 parents f6c14e2 + 6a94e4b commit 321e8ed
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
22 changes: 11 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
PATH
remote: .
specs:
omniauth-saml (1.1.0)
omniauth-saml (1.3.0)
omniauth (~> 1.1)
ruby-saml (~> 0.7.3)
ruby-saml (~> 0.8.1)

GEM
remote: https://rubygems.org/
specs:
canonix (0.1.1)
diff-lcs (1.2.4)
hashie (2.0.5)
macaddr (1.6.7)
hashie (3.3.2)
macaddr (1.7.1)
systemu (~> 2.6.2)
mini_portile (0.6.2)
multi_json (1.3.7)
nokogiri (1.5.11)
omniauth (1.2.1)
hashie (>= 1.2, < 3)
nokogiri (1.6.5)
mini_portile (~> 0.6.0)
omniauth (1.2.2)
hashie (>= 1.2, < 4)
rack (~> 1.0)
rack (1.5.2)
rack-test (0.6.2)
Expand All @@ -29,9 +30,8 @@ GEM
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
ruby-saml (0.7.3)
canonix (= 0.1.1)
nokogiri (~> 1.5.0)
ruby-saml (0.8.1)
nokogiri (>= 1.5.0)
uuid (~> 2.3)
simplecov (0.7.1)
multi_json (~> 1.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ The service provider metadata used to ease configuration of the SAML SP in the I
If not specified, the IdP is free to choose the name identifier format used
in the response. Optional.

* See the `Onelogin::Saml::Settings` class in the [Ruby SAML gem](https://github.com/onelogin/ruby-saml) for additional supported options.
* See the `OneLogin::RubySaml::Settings` class in the [Ruby SAML gem](https://github.com/onelogin/ruby-saml) for additional supported options.

## Authors

Expand Down
14 changes: 7 additions & 7 deletions lib/omniauth/strategies/saml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def request_phase
additional_params[mapped_param_key] = request.params[request_param_key.to_s] if request.params.has_key?(request_param_key.to_s)
end if runtime_request_parameters

authn_request = Onelogin::Saml::Authrequest.new
settings = Onelogin::Saml::Settings.new(options)
authn_request = OneLogin::RubySaml::Authrequest.new
settings = OneLogin::RubySaml::Settings.new(options)

redirect(authn_request.create(settings, additional_params))
end
Expand All @@ -39,8 +39,8 @@ def callback_phase
options.idp_cert_fingerprint = fingerprint_exists
end

response = Onelogin::Saml::Response.new(request.params['SAMLResponse'], options)
response.settings = Onelogin::Saml::Settings.new(options)
response = OneLogin::RubySaml::Response.new(request.params['SAMLResponse'], options)
response.settings = OneLogin::RubySaml::Settings.new(options)

@name_id = response.name_id
@attributes = response.attributes
Expand All @@ -54,7 +54,7 @@ def callback_phase
super
rescue OmniAuth::Strategies::SAML::ValidationError
fail!(:invalid_ticket, $!)
rescue Onelogin::Saml::ValidationError
rescue OneLogin::RubySaml::ValidationError
fail!(:invalid_ticket, $!)
end

Expand All @@ -76,8 +76,8 @@ def other_phase
@env['omniauth.strategy'] ||= self
setup_phase

response = Onelogin::Saml::Metadata.new
settings = Onelogin::Saml::Settings.new(options)
response = OneLogin::RubySaml::Metadata.new
settings = OneLogin::RubySaml::Settings.new(options)
Rack::Response.new(response.generate(settings), 200, { "Content-Type" => "application/xml" }).finish
else
call_app!
Expand Down
2 changes: 1 addition & 1 deletion omniauth-saml.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
gem.homepage = 'https://github.com/PracticallyGreen/omniauth-saml'

gem.add_runtime_dependency 'omniauth', '~> 1.1'
gem.add_runtime_dependency 'ruby-saml', '~> 0.7.3'
gem.add_runtime_dependency 'ruby-saml', '~> 0.8.1'

gem.add_development_dependency 'rspec', '~> 2.8'
gem.add_development_dependency 'simplecov', '~> 0.6'
Expand Down

0 comments on commit 321e8ed

Please sign in to comment.