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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 889ca0fab698389192fafa270c28659cdc4ae00f04e22695b62cc37f27b8f0b4
4
- data.tar.gz: 82e8d2b11abfe523771f89c97cc0bfbee80dbf2cba4a7ad5edd16333d8d087fe
3
+ metadata.gz: d73d5ae0293b2d4a0ad063240e3f95a001da70e794b29ff2d399149ff9465dfd
4
+ data.tar.gz: 305522239ebc06fa28172973789b16edd593156f50f345e16c77b7ec16bcab6f
5
5
  SHA512:
6
- metadata.gz: c973c504b24a55cd94a71e27c77037304f0c07482d55df794f5bbf533f18a7f4cd96f9eb5e9df19822bb9d605f31a46e26271f5f341f2382340bfaa11b3fb4ba
7
- data.tar.gz: 1d8762bb397f82f1703be76aa6dc8f12cc13b00d66656cd078b93aede9fe6c1b9725419fcd81fc39990dc61be3f9e6144f10f20b6102c7106314d5eed0f6833f
6
+ metadata.gz: 609c7f96cd8819ee3f986164c21009d201a13d68d95c8c8454c4da221a7a44ab63d4a38a7015fe4cf8ac5b752f38e0264b803db25730b540f5d0c8dc637e688b
7
+ data.tar.gz: f6945ad28f1bed2bb3185fa6f03e72bb0824518de98bfd8857a902f46f1bbe655a580dccb6e5a9af8a15274431102e9456e016b1a978d954aacb24c30fe12049
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Linode
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -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:view'
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/account/settings').parsed
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.1.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: 2018-01-20 00:00:00.000000000 Z
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
- rubyforge_project:
95
- rubygems_version: 2.7.3
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: []