omniauth-atech 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth/strategies/atech.rb +12 -7
- data/lib/omniauth-atech/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a972dc28303af21b2d7afc8a35e83623c0a2d62
|
4
|
+
data.tar.gz: f054db488f1b16c427a2c479c7967ea05407110c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20fe4c9d7864a293ed21c3284e5d4a2bc615a311a3e0758a336733a2e5cf5950e19fe29e732e0a62ee66b38d16286fee13167a51ba3b0f0397f41439c4e5a203
|
7
|
+
data.tar.gz: 565740f5ab3dabaa950f3cf38e6ff60f9f8ced1c71d993a5ee7a2d75540bf4691dbeb816a17af163694b45cb8bd06588385e756e5f3e0ede27e059b4a2f639f1
|
@@ -3,16 +3,16 @@ require 'omniauth-oauth2'
|
|
3
3
|
module OmniAuth
|
4
4
|
module Strategies
|
5
5
|
class Atech < OmniAuth::Strategies::OAuth2
|
6
|
-
|
6
|
+
|
7
7
|
# Set the site
|
8
8
|
option :client_options, {:site => 'https://identity.atechmedia.com'}
|
9
|
-
|
9
|
+
|
10
10
|
# Always request the 'email_address' when authenticating using Omniauth.
|
11
11
|
option :authorize_params, {:scope => 'email_address'}
|
12
12
|
|
13
|
-
# Set the UID
|
13
|
+
# Set the UID
|
14
14
|
uid { raw_info['identifier'].to_s }
|
15
|
-
|
15
|
+
|
16
16
|
# Set the all the default info properties as best we can
|
17
17
|
info do
|
18
18
|
{
|
@@ -24,12 +24,17 @@ module OmniAuth
|
|
24
24
|
'last_name' => raw_info['name']['last'],
|
25
25
|
}
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
28
|
# Provide access to the user's raw info
|
29
29
|
extra do
|
30
30
|
{'raw_info' => raw_info}
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
|
+
# Set the callback URL
|
34
|
+
def callback_url
|
35
|
+
full_host + script_name + callback_path
|
36
|
+
end
|
37
|
+
|
33
38
|
# Return all the raw information for the user
|
34
39
|
def raw_info
|
35
40
|
@raw_info ||= begin
|
@@ -38,7 +43,7 @@ module OmniAuth
|
|
38
43
|
access_token.get('oauth/api/profile').parsed
|
39
44
|
end
|
40
45
|
end
|
41
|
-
|
46
|
+
|
42
47
|
# Return the user's first e-mail address
|
43
48
|
def email_address
|
44
49
|
raw_info['email_addresses'] && raw_info['email_addresses'].first
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-atech
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Cooke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -69,8 +69,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
71
|
rubyforge_project:
|
72
|
-
rubygems_version: 2.4.5
|
72
|
+
rubygems_version: 2.4.5
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: OmniAuth strategy for aTech Media
|
76
76
|
test_files: []
|
77
|
+
has_rdoc:
|