omniauth-authentiq 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d152b93e57ba436e49e30fd7f431112caa8d7d00
4
- data.tar.gz: 60a303403dbf79a815e8b4c1eb6e1ef956a2da0c
3
+ metadata.gz: 8560d7ad601092c667fe1c25e4455a0131bb7c38
4
+ data.tar.gz: 38099791a64a96d54f65c5b9a0e18505a985512c
5
5
  SHA512:
6
- metadata.gz: 298d17713393ba75ed612351070d7a1dfeae1d525f3bce46e7196ebe7f71aac23113a6166f8a1763d61a39fa880641bc75310e5d7036318f7cfd4d98e76917af
7
- data.tar.gz: 1accbd0efe54a26d15f5081cfce63d6cefcb0005a3f70f95529992cd2ded0c28856a1ccbf03d72588efd0a71fa83704e0bea1fc4e4e9d6929a7b940c408908f2
6
+ metadata.gz: a6c4d1d27f4f163e5ff83b9e43f140a63356f5fcccf8c6e74872b00094759cbb09fc775eeaa92cd4ee5cf0fd7b7ae682cc081e8483bb55503c4a06989c1ff40e
7
+ data.tar.gz: 87920c93b8f43e0a62df1afa4e3026ad75bec0b2e97e7d590f4f6fb0ab1a53e38d88a303ab0548ab3e0ec12d9ec25a173c27eb5735689548dab828df2351e9e5
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # OmniAuth Authentiq
2
2
 
3
- Official OmniAuth strategy for authenticating with AuthentiqID. Sign up for [Authentiq](https://www.authentiq.com/register/?utm_source=github&utm_medium=readme&utm_campaign=omniauth) to obtain your application credentials.
3
+ Official [OmniAuth](https://github.com/omniauth/omniauth/wiki) strategy for authenticating with an Authentiq ID mobile app ([iOS](https://itunes.apple.com/us/app/authentiq-id/id964932341), [Android](https://play.google.com/store/apps/details?id=com.authentiq.authentiqid)).
4
+ Application credentials can be obtained [at Authentiq](https://www.authentiq.com/register/?utm_source=github&utm_medium=readme&utm_campaign=omniauth).
4
5
 
5
6
  ## Installation
6
7
 
@@ -14,26 +15,29 @@ Then bundle:
14
15
 
15
16
  $ bundle install
16
17
 
17
- # Basic Usage
18
+ # Basic Usage with Rails
18
19
 
19
20
  ```ruby
20
21
  use OmniAuth::Builder do
21
- provider :authentiq, ENV['AUTHENTIQ_KEY'], ENV['AUTHENTIQ_SECRET']
22
+ provider :authentiq, ENV['AUTHENTIQ_KEY'], ENV['AUTHENTIQ_SECRET'],
23
+ scope: 'aq:name email~rs aq:push'
22
24
  end
23
25
  ```
24
26
 
25
-
26
27
  # Scopes
27
28
 
28
- Authentiq gives you the capability to request various data from the user. This is done by adding the scope parameters to the basic usage.
29
+ Authentiq adds the capability to request personal information like name, email, phone number, and address from the Authentiq ID app ([iOS](https://itunes.apple.com/us/app/authentiq-id/id964932341), [Android](https://play.google.com/store/apps/details?id=com.authentiq.authentiqid)).
30
+ During authentication, and only after the user consents, this information will be shared by the Authentiq ID app.
29
31
 
30
- Depending on your implementation, you may need to declare the redirect_uri parameter
32
+ Requesting specific information or "scopes" is done by modifying the `scope` parameter in the basic usage example above.
33
+ Depending on your implementation, you may also need to provide the `redirect_uri` parameter.
31
34
 
35
+ Example:
32
36
  ```ruby
33
37
  use OmniAuth::Builder do
34
38
  provider :authentiq, ENV['AUTHENTIQ_KEY'], ENV['AUTHENTIQ_SECRET'],
35
39
  scope: 'aq:name email~rs aq:push phone address',
36
- redirect_uri: 'redirect_uri'
40
+ redirect_uri: '<REDIRECT_URI>'
37
41
  end
38
42
  ```
39
43
 
@@ -42,13 +46,15 @@ Available scopes are:
42
46
  - `email` for Email
43
47
  - `phone` for Phone
44
48
  - `address` for Address
45
- - `aq:location` for Location (Coordinates and geolocated address)
49
+ - `aq:location` for Location (geo coordinates)
50
+ - `aq:push` to request permission to sign in via Push Notifications in the Authentiq ID app
46
51
 
47
52
  Append `~r` to a scope to explicitly require it from the user.
48
53
 
49
- Append `~s` or `~rs` to phone or email scope to explicitly require a signed and/or verified scope from the user.
54
+ Append `~s` to phone or email scope to explicitly require a verified (signed) scope.
55
+
56
+ The `~s` and `~r` can be combined to `~rs` to indicate that the scope is both required and should be / have been verified.
50
57
 
51
- To enable login via Push Notifications in the Authentiq ID mobile app, add `aq:push` to the list of scopes.
52
58
 
53
59
  ## Tests
54
60
 
@@ -56,5 +62,4 @@ Tests are coming soon.
56
62
 
57
63
  ## Contributing
58
64
 
59
- Bug reports and pull requests are welcome on GitHub at https://gitlab.com/authentiq/omniauth-authentiq.
60
-
65
+ Bug reports and pull requests are welcome on GitHub at https://github.com/AuthentiqID/omniauth-authentiq.
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Authentiq
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
@@ -36,7 +36,7 @@ module OmniAuth
36
36
  :email => (@raw_info['email'] unless @raw_info['email'].nil?),
37
37
  :phone => (@raw_info['phone_number'] unless @raw_info['phone_number'].nil?),
38
38
  :location => (@raw_info['address'] unless @raw_info['address'].nil?),
39
- :geolocation => (@raw_info['location'] unless @raw_info['location'].nil?)
39
+ :geolocation => (@raw_info['aq:location'] unless @raw_info['aq:location'].nil?)
40
40
  }.reject { |k, v| v.nil? }
41
41
  end
42
42
 
@@ -46,7 +46,8 @@ module OmniAuth
46
46
  :email_verified => (@raw_info['email_verified'] unless @raw_info['email_verified'].nil?),
47
47
  :phone_type => (@raw_info['phone_type'] unless @raw_info['phone_type'].nil?),
48
48
  :phone_number_verified => (@raw_info['phone_number_verified'] unless @raw_info['phone_number_verified'].nil?),
49
- :locale => (@raw_info['locale'] unless @raw_info['locale'].nil?)
49
+ :locale => (@raw_info['locale'] unless @raw_info['locale'].nil?),
50
+ :zoneinfo => (@raw_info['zoneinfo'] unless @raw_info['zoneinfo'].nil?)
50
51
  }.reject { |k, v| v.nil? }
51
52
  end
52
53
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-authentiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandros Keramidas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-13 00:00:00.000000000 Z
11
+ date: 2016-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2