omniauth-bike-index 0.0.3 → 0.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 +3 -1
- data/README.md +3 -6
- data/lib/omniauth/bike_index/version.rb +1 -1
- data/lib/omniauth/strategies/bike_index.rb +1 -3
- data/spec/app.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df30b257d96047b03e1d60869233c69ee293bbb0
|
4
|
+
data.tar.gz: ff7734850c1f426614774c7d798a7e54dde7d1c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 747feadbb1ed8d937b44f583119d338186e66f4182d319b32691ecc28d67ca8eb3b9e8c0d14d93dc9a5a71ee8a279f4202ecf0c903c1c84c460d11069108d6cd
|
7
|
+
data.tar.gz: 7693d9b2c71430dee0dde1c7ea011c1d21f7751be888acaf62052ba7439f79416307f629e619b7245f4cad1133d70839b69deccb120b74d7851d4780c02ea365
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -61,7 +61,7 @@ Devise.setup do |config|
|
|
61
61
|
end
|
62
62
|
```
|
63
63
|
|
64
|
-
Available scopes: `read_user`, `write_user`, `read_bikes`, `write_bikes
|
64
|
+
Available scopes: `read_user`, `write_user`, `read_bikes`, `write_bikes`
|
65
65
|
|
66
66
|
|
67
67
|
## Credentials
|
@@ -72,11 +72,8 @@ If you include the `read_bikes` scope, the response will include an array of the
|
|
72
72
|
|
73
73
|
You can use these IDs to access information about the bikes - e.g. [BikeIndex.org/api/v1/bikes/3414](https://bikeindex.org/api/v1/bikes/3414) & [/api/v1/bikes/29367](https://bikeindex.org/api/v1/bikes/29367)
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
If you include the `read_user` scope, the response will include the user's username, email and name. You will also see their twitter handle and avatar if they have added them. The keys for these items -
|
79
|
-
`username`, `email`, `name`, `twitter` & `image` - all accessible in the `request.env['omniauth.auth']`, e.g. `request.env['omniauth.auth'].info.email`
|
75
|
+
If you include the `read_user` scope, the response will include the user's nickname, email and name. You will also see their twitter handle and avatar if they have added them. The keys for these items -
|
76
|
+
`nickname`, `email`, `name`, `twitter` & `image` - all accessible in the `request.env['omniauth.auth']`, e.g. `request.env['omniauth.auth'].info.email`
|
80
77
|
|
81
78
|
|
82
79
|
## Auth Hash
|
@@ -12,7 +12,7 @@ module OmniAuth
|
|
12
12
|
|
13
13
|
info do
|
14
14
|
prune!(
|
15
|
-
'
|
15
|
+
'nickname' => raw_info['user']['username'],
|
16
16
|
'bike_ids' => raw_info['bike_ids'],
|
17
17
|
'email' => raw_info['user']['email'],
|
18
18
|
'name' => raw_info['user']['name'],
|
@@ -33,8 +33,6 @@ module OmniAuth
|
|
33
33
|
|
34
34
|
def request_phase
|
35
35
|
options[:authorize_params] = {
|
36
|
-
# :client_id => options['client_id'],
|
37
|
-
# :response_type => 'code',
|
38
36
|
:scope => (options['scope'] || DEFAULT_SCOPE)
|
39
37
|
}
|
40
38
|
|
data/spec/app.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-bike-index
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Herr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
108
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
109
|
+
rubygems_version: 2.4.6
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Bike Index strategy for OmniAuth
|