From 6a94e4bfffe67b54d2ab9a12d57cf29833dfc30c Mon Sep 17 00:00:00 2001 From: Tom Hipkin Date: Thu, 22 Jan 2015 11:58:26 +0000 Subject: [PATCH] Bump ruby-saml to version 0.8.1 Accounted for breaking namespacing changes in ruby-saml. --- Gemfile.lock | 22 +++++++++++----------- README.md | 2 +- lib/omniauth/strategies/saml.rb | 14 +++++++------- omniauth-saml.gemspec | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e37c78b..4224138 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) diff --git a/README.md b/README.md index a7f320f..087aec4 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/lib/omniauth/strategies/saml.rb b/lib/omniauth/strategies/saml.rb index a9484b6..3eeea3e 100644 --- a/lib/omniauth/strategies/saml.rb +++ b/lib/omniauth/strategies/saml.rb @@ -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 @@ -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 @@ -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 @@ -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! diff --git a/omniauth-saml.gemspec b/omniauth-saml.gemspec index 35e1d5a..8b366cc 100644 --- a/omniauth-saml.gemspec +++ b/omniauth-saml.gemspec @@ -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'