omniauth-linode 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth-linode/version.rb +1 -1
- data/lib/omniauth/strategies/linode.rb +12 -2
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d73d5ae0293b2d4a0ad063240e3f95a001da70e794b29ff2d399149ff9465dfd
|
4
|
+
data.tar.gz: 305522239ebc06fa28172973789b16edd593156f50f345e16c77b7ec16bcab6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 609c7f96cd8819ee3f986164c21009d201a13d68d95c8c8454c4da221a7a44ab63d4a38a7015fe4cf8ac5b752f38e0264b803db25730b540f5d0c8dc637e688b
|
7
|
+
data.tar.gz: f6945ad28f1bed2bb3185fa6f03e72bb0824518de98bfd8857a902f46f1bbe655a580dccb6e5a9af8a15274431102e9456e016b1a978d954aacb24c30fe12049
|
@@ -4,7 +4,7 @@ require 'multi_json'
|
|
4
4
|
module OmniAuth
|
5
5
|
module Strategies
|
6
6
|
class Linode < OmniAuth::Strategies::OAuth2
|
7
|
-
DEFAULT_SCOPE = 'account:
|
7
|
+
DEFAULT_SCOPE = 'account:read_only'
|
8
8
|
|
9
9
|
option :name, 'linode'
|
10
10
|
|
@@ -14,6 +14,16 @@ module OmniAuth
|
|
14
14
|
:token_url => '/oauth/token',
|
15
15
|
}
|
16
16
|
|
17
|
+
uid { raw_info['uid'] }
|
18
|
+
|
19
|
+
info do
|
20
|
+
{
|
21
|
+
name: raw_info['username'],
|
22
|
+
email: raw_info['email'],
|
23
|
+
nickname: raw_info['username']
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
17
27
|
extra do
|
18
28
|
{
|
19
29
|
'raw_info' => raw_info
|
@@ -21,7 +31,7 @@ module OmniAuth
|
|
21
31
|
end
|
22
32
|
|
23
33
|
def raw_info
|
24
|
-
@raw_info ||= access_token.get('https://api.linode.com/v4/
|
34
|
+
@raw_info ||= access_token.get('https://api.linode.com/v4/profile').parsed
|
25
35
|
end
|
26
36
|
|
27
37
|
protected
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-linode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Oliver
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -76,7 +76,7 @@ homepage: https://github.com/excid3/omniauth-linode
|
|
76
76
|
licenses:
|
77
77
|
- MIT
|
78
78
|
metadata: {}
|
79
|
-
post_install_message:
|
79
|
+
post_install_message:
|
80
80
|
rdoc_options: []
|
81
81
|
require_paths:
|
82
82
|
- lib
|
@@ -91,9 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
|
-
|
95
|
-
|
96
|
-
signing_key:
|
94
|
+
rubygems_version: 3.1.4
|
95
|
+
signing_key:
|
97
96
|
specification_version: 4
|
98
97
|
summary: OmniAuth strategy for Linode
|
99
98
|
test_files: []
|