omniauth-saml 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of omniauth-saml might be problematic. Click here for more details.

checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2c97817e22f903d85818b687a7a003d8a752a5fe
4
+ data.tar.gz: c947e7c9a0c693ea8a38367aee1060a3c517ba2c
5
+ SHA512:
6
+ metadata.gz: 19ca24fce1e07008c93a66a2c2a7c46cb627372220364881ae2d966a68feec7a9fa6c75b019bdd5f935a4f6fb39a9ed5bee9008016bcf4eb51042f5cc3f105d7
7
+ data.tar.gz: d766149cecbfb73e20f253a46c790ae1a87b1d8085dcf68244890dacd6a9ed40beec355fc70a35f3b6efdd219553c47d301a090299bb71ebc2492b0dc5c817d4
data/CHANGELOG.md CHANGED
@@ -4,6 +4,9 @@ A generic SAML strategy for OmniAuth.
4
4
 
5
5
  https://github.com/PracticallyGreen/omniauth-saml
6
6
 
7
+ ## 1.2.0 (2014-03-19)
8
+
9
+ * provide SP metadata at `/auth/saml/metadata`
7
10
 
8
11
  ## 1.1.0 (2013-11-07)
9
12
 
data/README.md CHANGED
@@ -6,8 +6,8 @@ https://github.com/PracticallyGreen/omniauth-saml
6
6
 
7
7
  ## Requirements
8
8
 
9
- * [OmniAuth](http://www.omniauth.org/) 1.1+
10
- * Ruby 1.9.2
9
+ * [OmniAuth](http://www.omniauth.org/) 1.2+
10
+ * Ruby 1.9.x or Ruby 2.1.x
11
11
 
12
12
  ## Usage
13
13
 
@@ -50,6 +50,10 @@ end
50
50
 
51
51
  For IdP-initiated SSO, users should directly access the IdP SSO target URL. Set the `href` of your application's login link to the value of `idp_sso_target_url`. For SP-initiated SSO, link to `/auth/saml`.
52
52
 
53
+ ## Metadata
54
+
55
+ The service provider metadata used to ease configuration of the SAML SP in the IdP can be retrieved from `http://example.com/auth/saml/metadata`. Send this URL to the administrator of the IdP.
56
+
53
57
  ## Options
54
58
 
55
59
  * `:assertion_consumer_service_url` - The URL at which the SAML assertion should be
@@ -88,13 +92,13 @@ For IdP-initiated SSO, users should directly access the IdP SSO target URL. Set
88
92
 
89
93
  ## Authors
90
94
 
91
- Authored by Raecoo Cao, Todd W Saxton, Ryan Wilcox, Rajiv Aaron Manglani, Steven Anderson, and Nikos Dimitrakopoulos.
95
+ Authored by Raecoo Cao, Todd W Saxton, Ryan Wilcox, Rajiv Aaron Manglani, Steven Anderson, Nikos Dimitrakopoulos, and Rudolf Vriend.
92
96
 
93
97
  Maintained by [Rajiv Aaron Manglani](http://www.rajivmanglani.com/).
94
98
 
95
99
  ## License
96
100
 
97
- Copyright (c) 2011-2013 [Practically Green, Inc.](http://www.practicallygreen.com/).
101
+ Copyright (c) 2011-2014 [Practically Green, Inc.](http://www.practicallygreen.com/).
98
102
  All rights reserved. Released under the MIT license.
99
103
 
100
104
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module SAML
3
- VERSION = '1.1.0'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
@@ -48,6 +48,20 @@ module OmniAuth
48
48
  fail!(:invalid_ticket, $!)
49
49
  end
50
50
 
51
+ def other_phase
52
+ if on_path?("#{request_path}/metadata")
53
+ # omniauth does not set the strategy on the other_phase
54
+ @env['omniauth.strategy'] ||= self
55
+ setup_phase
56
+
57
+ response = Onelogin::Saml::Metadata.new
58
+ settings = Onelogin::Saml::Settings.new(options)
59
+ Rack::Response.new(response.generate(settings), 200, { "Content-Type" => "application/xml" }).finish
60
+ else
61
+ call_app!
62
+ end
63
+ end
64
+
51
65
  uid { @name_id }
52
66
 
53
67
  info do
@@ -125,4 +125,15 @@ describe OmniAuth::Strategies::SAML, :type => :strategy do
125
125
  it { should fail_with(:invalid_ticket) }
126
126
  end
127
127
  end
128
+
129
+ describe 'GET /auth/saml/metadata' do
130
+ before do
131
+ get '/auth/saml/metadata'
132
+ end
133
+
134
+ it 'should get SP metadata page' do
135
+ last_response.status.should == 200
136
+ last_response.header["Content-Type"].should == "application/xml"
137
+ end
138
+ end
128
139
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-saml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
4
+ version: 1.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Raecoo Cao
@@ -10,89 +9,80 @@ authors:
10
9
  - Rajiv Aaron Manglani
11
10
  - Steven Anderson
12
11
  - Nikos Dimitrakopoulos
12
+ - Rudolf Vriend
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-11-11 00:00:00.000000000 Z
16
+ date: 2014-03-19 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: omniauth
20
20
  requirement: !ruby/object:Gem::Requirement
21
- none: false
22
21
  requirements:
23
- - - ~>
22
+ - - "~>"
24
23
  - !ruby/object:Gem::Version
25
- version: '1.1'
24
+ version: '1.2'
26
25
  type: :runtime
27
26
  prerelease: false
28
27
  version_requirements: !ruby/object:Gem::Requirement
29
- none: false
30
28
  requirements:
31
- - - ~>
29
+ - - "~>"
32
30
  - !ruby/object:Gem::Version
33
- version: '1.1'
31
+ version: '1.2'
34
32
  - !ruby/object:Gem::Dependency
35
33
  name: ruby-saml
36
34
  requirement: !ruby/object:Gem::Requirement
37
- none: false
38
35
  requirements:
39
- - - ~>
36
+ - - "~>"
40
37
  - !ruby/object:Gem::Version
41
- version: 0.7.2
38
+ version: 0.7.3
42
39
  type: :runtime
43
40
  prerelease: false
44
41
  version_requirements: !ruby/object:Gem::Requirement
45
- none: false
46
42
  requirements:
47
- - - ~>
43
+ - - "~>"
48
44
  - !ruby/object:Gem::Version
49
- version: 0.7.2
45
+ version: 0.7.3
50
46
  - !ruby/object:Gem::Dependency
51
47
  name: rspec
52
48
  requirement: !ruby/object:Gem::Requirement
53
- none: false
54
49
  requirements:
55
- - - ~>
50
+ - - "~>"
56
51
  - !ruby/object:Gem::Version
57
52
  version: '2.8'
58
53
  type: :development
59
54
  prerelease: false
60
55
  version_requirements: !ruby/object:Gem::Requirement
61
- none: false
62
56
  requirements:
63
- - - ~>
57
+ - - "~>"
64
58
  - !ruby/object:Gem::Version
65
59
  version: '2.8'
66
60
  - !ruby/object:Gem::Dependency
67
61
  name: simplecov
68
62
  requirement: !ruby/object:Gem::Requirement
69
- none: false
70
63
  requirements:
71
- - - ~>
64
+ - - "~>"
72
65
  - !ruby/object:Gem::Version
73
66
  version: '0.6'
74
67
  type: :development
75
68
  prerelease: false
76
69
  version_requirements: !ruby/object:Gem::Requirement
77
- none: false
78
70
  requirements:
79
- - - ~>
71
+ - - "~>"
80
72
  - !ruby/object:Gem::Version
81
73
  version: '0.6'
82
74
  - !ruby/object:Gem::Dependency
83
75
  name: rack-test
84
76
  requirement: !ruby/object:Gem::Requirement
85
- none: false
86
77
  requirements:
87
- - - ~>
78
+ - - "~>"
88
79
  - !ruby/object:Gem::Version
89
80
  version: '0.6'
90
81
  type: :development
91
82
  prerelease: false
92
83
  version_requirements: !ruby/object:Gem::Requirement
93
- none: false
94
84
  requirements:
95
- - - ~>
85
+ - - "~>"
96
86
  - !ruby/object:Gem::Version
97
87
  version: '0.6'
98
88
  description: A generic SAML strategy for OmniAuth.
@@ -101,37 +91,37 @@ executables: []
101
91
  extensions: []
102
92
  extra_rdoc_files: []
103
93
  files:
104
- - README.md
105
94
  - CHANGELOG.md
106
- - lib/omniauth/strategies/saml/validation_error.rb
107
- - lib/omniauth/strategies/saml.rb
108
- - lib/omniauth-saml/version.rb
95
+ - README.md
109
96
  - lib/omniauth-saml.rb
97
+ - lib/omniauth-saml/version.rb
98
+ - lib/omniauth/strategies/saml.rb
99
+ - lib/omniauth/strategies/saml/validation_error.rb
110
100
  - spec/omniauth/strategies/saml_spec.rb
111
101
  - spec/spec_helper.rb
112
102
  homepage: https://github.com/PracticallyGreen/omniauth-saml
113
- licenses: []
103
+ licenses:
104
+ - MIT
105
+ metadata: {}
114
106
  post_install_message:
115
107
  rdoc_options: []
116
108
  require_paths:
117
109
  - lib
118
110
  required_ruby_version: !ruby/object:Gem::Requirement
119
- none: false
120
111
  requirements:
121
- - - ! '>='
112
+ - - ">="
122
113
  - !ruby/object:Gem::Version
123
114
  version: '0'
124
115
  required_rubygems_version: !ruby/object:Gem::Requirement
125
- none: false
126
116
  requirements:
127
- - - ! '>='
117
+ - - ">="
128
118
  - !ruby/object:Gem::Version
129
119
  version: '0'
130
120
  requirements: []
131
121
  rubyforge_project:
132
- rubygems_version: 1.8.23
122
+ rubygems_version: 2.2.2
133
123
  signing_key:
134
- specification_version: 3
124
+ specification_version: 4
135
125
  summary: A generic SAML strategy for OmniAuth.
136
126
  test_files:
137
127
  - spec/omniauth/strategies/saml_spec.rb