omniauth-authentiq 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -12
- data/lib/omniauth/authentiq/version.rb +1 -1
- data/lib/omniauth/strategies/authentiq.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8560d7ad601092c667fe1c25e4455a0131bb7c38
|
4
|
+
data.tar.gz: 38099791a64a96d54f65c5b9a0e18505a985512c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
-
|
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: '
|
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 (
|
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`
|
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://
|
60
|
-
|
65
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/AuthentiqID/omniauth-authentiq.
|
@@ -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.
|
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-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|