omniauth-cas-login 1.0.2 → 1.0.3
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.
- checksums.yaml +8 -8
- data/README.md +8 -2
- data/lib/omniauth-cas-login/version.rb +1 -1
- data/lib/omniauth/strategies/cas_login.rb +1 -2
- data/spec/omniauth/strategies/cas_login_spec.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NTQyODg3NjJmOTdiODYyMzVmOGJhNDMzMjFhYTU1NTc5ZjFiMzBlMw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NjU5YzkzNTg1MGZhYjk4M2Y3M2I3MmUxMTg2MDIxNzAwODE0MjMyNw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
MWRjMTdmYzliNzFjMDYyNDJiNWNlZGE1YTE2YWQ5NmM3ZTI5NmU2ZWRlOTlj
|
|
10
|
+
YTdmZjkwYmFkYTI0MTdmMTI1ZGU2NDJjMjRiN2M1Mzk1ZmJiNGQwYzk3YzRm
|
|
11
|
+
MDc3MWQ5NzNmMjU2ZmM1YzRkYTBjZmRiODQ2MDg2NGExZTUxMmY=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MjI0NjMxNDZlNDA2NGIyNThiZDVmMWI2MzA0M2RiMzg3OWI2NTBjMzgwNDI0
|
|
14
|
+
MTczNTFiNmViMzU1ZDU3NTQ1NzRmNzQ1OGIzNjU2YzFkZGYzMzg4ZDcxM2Uw
|
|
15
|
+
MTFjYjM4NDExYTRlNDk5YzdiMzVkOTgwODBiMzM0MTcwOTAyNGI=
|
data/README.md
CHANGED
|
@@ -19,7 +19,13 @@ If you need to use the gem locally from source, place the root folder in 'vendor
|
|
|
19
19
|
Next, tell OmniAuth about this provider. For a Rails app, your `config/initializers/omniauth.rb` file should look like this:
|
|
20
20
|
|
|
21
21
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
|
22
|
-
provider :cas_login, "CLIENT_KEY", "CLIENT_SECRET"
|
|
22
|
+
provider :cas_login, "CLIENT_KEY", "CLIENT_SECRET", {
|
|
23
|
+
:client_options => {
|
|
24
|
+
:site => "SITE_URL", # E.g. https://example.com
|
|
25
|
+
:authorize_url => "AUTHORIZE_URL", # Relative auth path from "SITE_URL", e.g. /authorize
|
|
26
|
+
:token_url => "TOKEN_URL", # Relative path to obtain token from "SITE URL", e.g. /token
|
|
27
|
+
:profile_url => "PROFILE_URL" # Relative path to get user's profile, e.g. /profile
|
|
28
|
+
}
|
|
23
29
|
end
|
|
24
30
|
|
|
25
|
-
Replace
|
|
31
|
+
Replace the parameters above with the appropriate values you obtained from the login provider.
|
|
@@ -31,9 +31,8 @@ module OmniAuth
|
|
|
31
31
|
info do
|
|
32
32
|
{
|
|
33
33
|
:principal => raw_info['principal'],
|
|
34
|
-
:email => raw_info.has_key?('email') ? raw_info['email'] : '',
|
|
35
34
|
:name => raw_info['name'],
|
|
36
|
-
:
|
|
35
|
+
:profiles => raw_info.has_key?('profiles') ? raw_info['profiles'] : {}
|
|
37
36
|
}
|
|
38
37
|
end
|
|
39
38
|
|
|
@@ -32,8 +32,7 @@ describe OmniAuth::Strategies::CasLogin do
|
|
|
32
32
|
context 'and therefore has all the necessary fields' do
|
|
33
33
|
it { subject.info.should have_key :principal }
|
|
34
34
|
it { subject.info.should have_key :name }
|
|
35
|
-
it { subject.info.should have_key :
|
|
36
|
-
it { subject.info.should have_key :thirdPartyIds }
|
|
35
|
+
it { subject.info.should have_key :profiles }
|
|
37
36
|
end
|
|
38
37
|
end
|
|
39
38
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-cas-login
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Antonio Ruano Cuesta
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2014-02-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: omniauth
|