omniauth-openam 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +2 -3
- data/README.md +1 -1
- data/Rakefile +1 -3
- data/lib/omniauth-openam/version.rb +1 -1
- data/lib/omniauth/strategies/openam.rb +5 -3
- data/omniauth-openam.gemspec +2 -0
- data/spec/omniauth/strategies/openam_spec.rb +22 -2
- metadata +31 -4
- data/Gemfile.lock +0 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ed724bfbe0158c89bf03d3eab94334ee6994743
|
4
|
+
data.tar.gz: 338014fa405939205da4256aaa7e2a9e722db2d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b00ba58df23ac3f2be3c1ed006617c123f1743e579b11397d81ba0750a0f62458e630e024ebc008bbde3cf7fbcd0196d69679d3a9cf57cd69f9bd65164d05ee3
|
7
|
+
data.tar.gz: b058317b26cfe271ee1c2252313db94cc6ac1679be6e343bf9ac6ab72a1e3a350f4354ff92200e50b7946408c5107a60f3ccf080cb4aefa40444dea3da43e6b2
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# OmniAuth OpenAM
|
2
2
|
|
3
|
-
[![Continuous Integration status](https://secure.travis-ci.org/mak-it/omniauth-openam.
|
3
|
+
[![Continuous Integration status](https://secure.travis-ci.org/mak-it/omniauth-openam.svg)](http://travis-ci.org/mak-it/omniauth-openam)
|
4
4
|
|
5
5
|
OmniAuth strategy for authenticating to [OpenAM](https://www.forgerock.com/products/access-management/).
|
6
6
|
|
data/Rakefile
CHANGED
@@ -6,10 +6,11 @@ module OmniAuth
|
|
6
6
|
class OpenAM
|
7
7
|
include OmniAuth::Strategy
|
8
8
|
|
9
|
-
option :cookie_name, 'iPlanetDirectoryPro'
|
10
|
-
|
11
9
|
args [:auth_url]
|
12
10
|
|
11
|
+
option :cookie_name, 'iPlanetDirectoryPro'
|
12
|
+
option :login_url, nil
|
13
|
+
|
13
14
|
attr_reader :token
|
14
15
|
|
15
16
|
uid do
|
@@ -41,7 +42,8 @@ module OmniAuth
|
|
41
42
|
protected
|
42
43
|
|
43
44
|
def request_phase
|
44
|
-
|
45
|
+
login_url = options[:login_url] || options[:auth_url]
|
46
|
+
redirect "#{login_url}?goto=#{callback_url}"
|
45
47
|
end
|
46
48
|
|
47
49
|
def callback_phase
|
data/omniauth-openam.gemspec
CHANGED
@@ -7,8 +7,12 @@ RSpec.describe OmniAuth::Strategies::OpenAM, type: :strategy do
|
|
7
7
|
"AQIC5wM2LY4SfcxuxIP0VnP2lVjs7ypEM6VDx6srk56CN1Q.*AAJTSQACMDE.*"
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
[OmniAuth::Strategies::OpenAM, "https://example.com/opensso"]
|
10
|
+
let :strategy do
|
11
|
+
[OmniAuth::Strategies::OpenAM, "https://example.com/opensso", options]
|
12
|
+
end
|
13
|
+
|
14
|
+
let :options do
|
15
|
+
{}
|
12
16
|
end
|
13
17
|
|
14
18
|
describe '/auth/openam' do
|
@@ -21,6 +25,22 @@ RSpec.describe OmniAuth::Strategies::OpenAM, type: :strategy do
|
|
21
25
|
'?goto=http://example.org/auth/openam/callback'
|
22
26
|
)
|
23
27
|
end
|
28
|
+
|
29
|
+
context 'with login_url' do
|
30
|
+
let :options do
|
31
|
+
{ login_url: 'https://example.com/CustomLogin' }
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'redirects to OpenAM login page' do
|
35
|
+
get '/auth/openam'
|
36
|
+
expect(last_response).to be_redirect
|
37
|
+
expect(last_response.headers['Location']).to \
|
38
|
+
eq(
|
39
|
+
'https://example.com/CustomLogin'\
|
40
|
+
'?goto=http://example.org/auth/openam/callback'
|
41
|
+
)
|
42
|
+
end
|
43
|
+
end
|
24
44
|
end
|
25
45
|
|
26
46
|
describe '/auth/openam/callback' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-openam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edgars Beigarts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -94,6 +94,34 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: syck
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
97
125
|
description: This is an OmniAuth provider for OpenAM's REST API
|
98
126
|
email:
|
99
127
|
- edgars.beigarts@gmail.com
|
@@ -104,7 +132,6 @@ files:
|
|
104
132
|
- ".gitignore"
|
105
133
|
- ".travis.yml"
|
106
134
|
- Gemfile
|
107
|
-
- Gemfile.lock
|
108
135
|
- LICENSE.txt
|
109
136
|
- README.md
|
110
137
|
- Rakefile
|
@@ -135,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
162
|
version: '0'
|
136
163
|
requirements: []
|
137
164
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
165
|
+
rubygems_version: 2.6.11
|
139
166
|
signing_key:
|
140
167
|
specification_version: 4
|
141
168
|
summary: An OmniAuth provider for OpenAM REST API
|
data/Gemfile.lock
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
omniauth-openam (1.0.0)
|
5
|
-
faraday
|
6
|
-
omniauth (~> 1.0)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: http://rubygems.org/
|
10
|
-
specs:
|
11
|
-
addressable (2.3.5)
|
12
|
-
crack (0.4.2)
|
13
|
-
safe_yaml (~> 1.0.0)
|
14
|
-
diff-lcs (1.2.5)
|
15
|
-
docile (1.1.2)
|
16
|
-
faraday (0.9.2)
|
17
|
-
multipart-post (>= 1.2, < 3)
|
18
|
-
hashie (3.4.3)
|
19
|
-
multi_json (1.8.4)
|
20
|
-
multipart-post (2.0.0)
|
21
|
-
omniauth (1.2.2)
|
22
|
-
hashie (>= 1.2, < 4)
|
23
|
-
rack (~> 1.0)
|
24
|
-
rack (1.5.2)
|
25
|
-
rack-test (0.6.2)
|
26
|
-
rack (>= 1.0)
|
27
|
-
rspec (2.14.1)
|
28
|
-
rspec-core (~> 2.14.0)
|
29
|
-
rspec-expectations (~> 2.14.0)
|
30
|
-
rspec-mocks (~> 2.14.0)
|
31
|
-
rspec-core (2.14.7)
|
32
|
-
rspec-expectations (2.14.5)
|
33
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
34
|
-
rspec-mocks (2.14.5)
|
35
|
-
safe_yaml (1.0.1)
|
36
|
-
simplecov (0.8.2)
|
37
|
-
docile (~> 1.1.0)
|
38
|
-
multi_json
|
39
|
-
simplecov-html (~> 0.8.0)
|
40
|
-
simplecov-html (0.8.0)
|
41
|
-
webmock (1.17.2)
|
42
|
-
addressable (>= 2.2.7)
|
43
|
-
crack (>= 0.3.2)
|
44
|
-
|
45
|
-
PLATFORMS
|
46
|
-
ruby
|
47
|
-
|
48
|
-
DEPENDENCIES
|
49
|
-
omniauth-openam!
|
50
|
-
rack-test
|
51
|
-
rspec (~> 2.7)
|
52
|
-
simplecov
|
53
|
-
webmock
|