omniauth-krystal 1.0.0 → 1.0.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
  SHA256:
3
- metadata.gz: 2daa4b31b516871e6746dfdf65b88debfb9865346643d45748da4a8d2512a931
4
- data.tar.gz: f79f01ab1e94adc46019781b345fa7f5da953a0fccfc95c91161611f7c649017
3
+ metadata.gz: '049356cb76b852f8c9b154677f14aff9f4e17af839d22a37f35a6b28b985960a'
4
+ data.tar.gz: d157b48040898ca1cd86638e6ad8e0baf5285b80473ed5936e3fab7cc74102cc
5
5
  SHA512:
6
- metadata.gz: 7b36b81ab2773b9469d94460abe23addc1566448ca69e0d71d384193ac238aad7865b7fbb9d0f94706e1eaa1b9ada91d63ab78323e30b45b4093dd321bc6f302
7
- data.tar.gz: 913f7259106ddd54f9217be23c520a4b07887e2c9c2c9d92b5d890d9e2442409b7b99036d4f4dcb9a2705c2fa7286c0fbe963a2089083760514fc9bf83a3df4c
6
+ metadata.gz: a9cc23de7e8bc7de9d5c0a49e3f1d53fdae9da0a26f74cbf25fc115d99a3c29db75e30b4b65a00bfb59be72f6a49218a8158a60260d9ebaf85217656ca1ad007
7
+ data.tar.gz: 6c82a640fabd5e3ef1388e5f63e3aaab6f6dad2ed93266337c6a3f469f8d449f80940201a8469ff6da545a45292f64b9559e242cacdbfcd2da1c749a2e431621
@@ -2,12 +2,11 @@
2
2
 
3
3
  module OmniAuth
4
4
  module Krystal
5
-
6
5
  VERSION_FILE = File.expand_path('../../../VERSION', __dir__)
7
- if File.file?(VERSION_FILE)
8
- VERSION = File.read(VERSION_FILE).strip
9
- else
10
- VERSION = '0.0.0'
11
- end
6
+ VERSION = if File.file?(VERSION_FILE)
7
+ File.read(VERSION_FILE).strip
8
+ else
9
+ '0.0.0'
10
+ end
12
11
  end
13
12
  end
@@ -5,21 +5,22 @@ require 'omniauth/strategies/oauth2'
5
5
  module OmniAuth
6
6
  module Strategies
7
7
  class Krystal < OmniAuth::Strategies::OAuth2
8
+ option :name, 'krystal'
8
9
 
9
- option :name, "krystal"
10
+ option :client_options,
11
+ site: ENV.fetch('KRYSTAL_IDENTITY_API_URL', 'https://identity.k.io/api/v1'),
12
+ authorize_url: ENV.fetch('KRYSTAL_IDENTITY_OAUTH_AUTHORIZE_URL', 'https://oauth.identity.k.io/oauth2/auth'),
13
+ token_url: ENV.fetch('KRYSTAL_IDENTITY_OAUTH_TOKEN_URL', 'https://oauth.identity.k.io/oauth2/token')
10
14
 
11
- option :client_options,
12
- site: ENV.fetch("KRYSTAL_IDENTITY_API_URL", "https://identity.k.io/api/v1"),
13
- authorize_url: ENV.fetch("KRYSTAL_IDENTITY_OAUTH_AUTHORIZE_URL", "https://oauth.identity.k.io/oauth2/auth"),
14
- token_url: ENV.fetch("KRYSTAL_IDENTITY_OAUTH_TOKEN_URL", "https://oauth.identity.k.io/oauth2/token")
15
-
15
+ option :authorize_params,
16
+ scope: 'user.profile'
16
17
 
17
- uid { raw_info["user"]["id"] }
18
+ uid { raw_info['user']['id'] }
18
19
 
19
20
  info do
20
21
  {
21
22
  name: "#{raw_info['user']['first_name']} #{raw_info['user']['last_name']}",
22
- email: raw_info["user"]["email_address"]
23
+ email: raw_info['user']['email_address']
23
24
  }
24
25
  end
25
26
 
@@ -31,7 +32,7 @@ module OmniAuth
31
32
  end
32
33
 
33
34
  def scope
34
- access_token["scope"]
35
+ access_token['scope']
35
36
  end
36
37
 
37
38
  def callback_url
@@ -39,11 +40,8 @@ module OmniAuth
39
40
  end
40
41
 
41
42
  def raw_info
42
- @raw_info ||= access_token.get("user").parsed
43
+ @raw_info ||= access_token.get('user').parsed
43
44
  end
44
-
45
45
  end
46
46
  end
47
47
  end
48
-
49
- OmniAuth.config.add_camelization "krystal", "Krystal"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-krystal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-11 00:00:00.000000000 Z
11
+ date: 2022-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.8'
33
+ version: '1.7'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.8'
40
+ version: '1.7'
41
41
  description: OmniAuth strategy for Krystal Identity
42
42
  email:
43
43
  - adam@krystal.uk
@@ -60,7 +60,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: '0'
63
+ version: '2.6'
64
64
  required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="