omniauth-slack-openid 1.2.0 → 2.0.1

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: a0b8da342cc5012b1efbfb15c73e72dfd8718074217b4ae5969d5b4a6c3fbadc
4
- data.tar.gz: a5fbb3cf54c8126ad6a902c4f5f866ca081d9d0aadb701f2aedaa0eb6925dcec
3
+ metadata.gz: 4d78eeda0caabf16d7d7b0b2b575aacaa3d189f56f0456129a54b6c3d97033d7
4
+ data.tar.gz: 1d5524cb8100b7f287e2480a4e5c721c0457a3916793112a0550694333143177
5
5
  SHA512:
6
- metadata.gz: 3f1b25a66258bec67245cfa69c7b1b4ceaa12e5114740a039d66b1bb770e1a2184af4b08cacc03f33516072b9ccf08543a93d51eb4f2468dda4b4fa723bf338a
7
- data.tar.gz: 0d1c1afc9074f073710a6f01489c5ec0367e9f8b624a1e9716e6dabbd6f3c4063babad419d3f92ca31ea4e127df85515842777db13ee2e8c957f3cb924653ea1
6
+ metadata.gz: 9982ea29761ae211eacf1e87226d99f19a04011a71a564bb327c8acba90b99352a628f7fb7ca85bb8f6c94291404edc7a0fedf1fda781fd7a89fbd2b5416966b
7
+ data.tar.gz: 9c4efdd7550b1147c261655969b9783be3c75540c448250d5293a4a37684c4d6575c9017cf9dcab5f25339f7202df37ebc32683ecd577f0a525a3c451e21918c
data/CHANGELOG.md CHANGED
@@ -1,19 +1,36 @@
1
- # 1.2.0
1
+ # CHANGELOG
2
2
 
3
- * Switch from Data to Struct
3
+ ## 2.0.1 (2026-07-19)
4
4
 
5
- # 1.1.0
5
+ - Omit `info[:email]` unless Slack reports `email_verified: true` (unverified email stays on `extra`)
6
+ - Document userInfo-based identity (no `id_token` JWT validation) and keep CSRF state checks enabled in examples
7
+ - Commit Ruby 4.0 appraisal lockfile; Dependabot watches `gemfiles/`
8
+ - Cover non-Hash userInfo, request `scope`, and AuthHash build from userInfo; split strategy specs by concern
9
+ - Raise Polyrun coverage floor to 100% line coverage on tracked lib files
6
10
 
7
- * Set minimum ruby version requirement to 2.5.0
11
+ ## 2.0.0 (2026-07-19)
8
12
 
9
- # 1.0.2
13
+ - BREAKING: Require Ruby 3.4 or newer
14
+ - BREAKING: Fail authentication when Slack userInfo returns an error or omits team/user ids
15
+ - BREAKING: Raise `ArgumentError` from `generate_uid` when team or user id is blank
16
+ - Pass Slack `team` (and `scope`) through authorize params for workspace-scoped sign-in
10
17
 
11
- * Updated gem configuration
18
+ ## 1.2.0 (2023-08-30)
12
19
 
13
- # 1.0.1
20
+ - Switch info payload helper from `Data` to `Struct`
14
21
 
15
- * Updated gem description
22
+ ## 1.1.0 (2023-08-30)
16
23
 
17
- # 1.0.0
24
+ - Require Ruby 2.5 or newer
18
25
 
19
- * Initial version
26
+ ## 1.0.2 (2023-08-29)
27
+
28
+ - Update gem packaging configuration
29
+
30
+ ## 1.0.1 (2023-08-28)
31
+
32
+ - Update gem description
33
+
34
+ ## 1.0.0 (2023-08-28)
35
+
36
+ - Initial release
data/README.md CHANGED
@@ -1,12 +1,16 @@
1
1
  # omniauth-slack-openid.rb
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/omniauth-slack-openid.svg)](https://badge.fury.io/rb/omniauth-slack-openid) [![Test Status](https://github.com/amkisko/omniauth-slack-openid.rb/actions/workflows/test.yml/badge.svg)](https://github.com/amkisko/omniauth-slack-openid.rb/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/amkisko/omniauth-slack-openid.rb/graph/badge.svg?token=HIOT78D47F)](https://codecov.io/gh/amkisko/omniauth-slack-openid.rb)
3
+ [![Gem Version](https://badge.fury.io/rb/omniauth-slack-openid.svg)](https://badge.fury.io/rb/omniauth-slack-openid) [![Test Status](https://github.com/amkisko/omniauth-slack-openid.rb/actions/workflows/test.yml/badge.svg)](https://github.com/amkisko/omniauth-slack-openid.rb/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/amkisko/omniauth-slack-openid.rb/graph/badge.svg?token=HIOT78D47F)](https://app.codecov.io/github/amkisko/omniauth-slack-openid.rb)
4
4
 
5
5
  An OmniAuth strategy for implementing Sign-in with Slack using OpenID Connect.
6
6
 
7
- Official documentation: https://api.slack.com/authentication/sign-in-with-slack
7
+ Official Slack API documentation: https://api.slack.com/authentication/sign-in-with-slack
8
8
 
9
- Sponsored by [Kisko Labs](https://www.kiskolabs.com).
9
+ ## Identity model
10
+
11
+ This strategy exchanges the OAuth authorization code for an access token, then loads identity from Slack `openid.connect.userInfo`. It does not validate Slack's `id_token` JWT (signature, `aud`, `iss`, `exp`, or `nonce`). Treat the OmniAuth AuthHash as session identity established through Slack's token and userInfo endpoints, not as a fully verified OIDC ID token.
12
+
13
+ `info[:email]` is set only when Slack reports `email_verified: true`. Unverified addresses remain available on `extra[:data].email` and `extra[:raw_info]` when you need them for display or support flows.
10
14
 
11
15
  ## Install
12
16
 
@@ -46,13 +50,12 @@ Add the following to your `config/initializers/devise.rb`:
46
50
  ENV.fetch("SLACK_CLIENT_SECRET"),
47
51
  {
48
52
  scope: "openid,email,profile",
49
- redirect_uri: Rails.env.development? ? "https://localhost:3000/user/auth/slack_openid/callback" : nil,
50
- provider_ignores_state: Rails.env.development?
53
+ redirect_uri: Rails.env.development? ? "https://localhost:3000/user/auth/slack_openid/callback" : nil
51
54
  }
52
55
  )
53
56
  ```
54
57
 
55
- In order to test the callback in development, try logging in and then manually update URL to use http instead of https.
58
+ Keep OmniAuth state checks enabled (`provider_ignores_state` must stay unset or false outside local debugging). Prefer fixing local TLS or `redirect_uri` over disabling CSRF state validation. For local callback testing with an HTTPS redirect registered in Slack, complete the authorize step, then if needed adjust the callback URL host scheme carefully while leaving state verification on.
56
59
 
57
60
  ## Generating uid
58
61
 
@@ -77,6 +80,27 @@ gem build omniauth-slack-openid.gemspec
77
80
  gem push omniauth-slack-openid-*.gem
78
81
  ```
79
82
 
83
+ ## Links
84
+
85
+ - [GitHub](https://github.com/amkisko/omniauth-slack-openid.rb)
86
+ - [GitLab](https://gitlab.com/amkisko/omniauth-slack-openid.rb)
87
+ - [RubyGems](https://rubygems.org/gems/omniauth-slack-openid)
88
+ - [Versions Atom](https://rubygems.org/gems/omniauth-slack-openid/versions.atom) (feed id `5816970036548`)
89
+ - [libraries.io](https://libraries.io/rubygems/omniauth-slack-openid)
90
+ - [Deps.dev](https://deps.dev/rubygems/omniauth-slack-openid)
91
+ - [SonarCloud](https://sonarcloud.io/project/overview?id=amkisko_omniauth-slack-openid.rb)
92
+ - [Snyk](https://snyk.io/test/github/amkisko/omniauth-slack-openid.rb)
93
+ - [Codecov](https://app.codecov.io/github/amkisko/omniauth-slack-openid.rb)
94
+ - [OpenSSF Scorecard](https://scorecard.dev/viewer/?uri=github.com/amkisko/omniauth-slack-openid.rb)
95
+
80
96
  ## License
81
97
 
82
98
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
99
+
100
+ ## Sponsors
101
+
102
+ Sponsored by [Kisko Labs](https://www.kiskolabs.com).
103
+
104
+ <a href="https://www.kiskolabs.com">
105
+ <img src="kisko.svg" width="200" alt="Sponsored by Kisko Labs" />
106
+ </a>
@@ -1,7 +1,7 @@
1
- require 'omniauth/strategies/slack_openid'
1
+ require "omniauth/strategies/slack_openid"
2
2
 
3
3
  module OmniAuth
4
4
  module SlackOpenid
5
- VERSION = '1.2.0'
5
+ VERSION = "2.0.1"
6
6
  end
7
7
  end
@@ -1,9 +1,9 @@
1
- require 'omniauth/strategies/oauth2'
1
+ require "omniauth/strategies/oauth2"
2
2
 
3
3
  module OmniAuth
4
4
  module Strategies
5
5
  class SlackOpenid < OmniAuth::Strategies::OAuth2
6
- AUTH_OPTIONS = %i[scope user_scope team team_domain].freeze
6
+ AUTH_OPTIONS = %i[scope team].freeze
7
7
 
8
8
  INFO_DATA = Struct.new(
9
9
  :user_id,
@@ -21,16 +21,23 @@ module OmniAuth
21
21
 
22
22
  option :name, "slack_openid"
23
23
  option :client_options,
24
- {
25
- site: "https://slack.com",
26
- authorize_url: "/openid/connect/authorize",
27
- token_url: "/api/openid.connect.token"
28
- }
24
+ {
25
+ site: "https://slack.com",
26
+ authorize_url: "/openid/connect/authorize",
27
+ token_url: "/api/openid.connect.token"
28
+ }
29
29
 
30
30
  option :redirect_uri
31
+ option :authorize_options, AUTH_OPTIONS
31
32
 
32
33
  def self.generate_uid(team_id, user_id)
33
- "#{team_id}-#{user_id}"
34
+ team = team_id.to_s
35
+ user = user_id.to_s
36
+ if team.empty? || user.empty?
37
+ raise ArgumentError, "team_id and user_id are required"
38
+ end
39
+
40
+ "#{team}-#{user}"
34
41
  end
35
42
 
36
43
  uid do
@@ -40,11 +47,13 @@ module OmniAuth
40
47
  )
41
48
  end
42
49
 
43
- info do {
44
- name: raw_info["name"],
45
- email: raw_info["email"],
46
- image: raw_info["picture"]
47
- } end
50
+ info do
51
+ {
52
+ name: raw_info["name"],
53
+ email: (raw_info["email"] if raw_info["email_verified"] == true),
54
+ image: raw_info["picture"]
55
+ }
56
+ end
48
57
 
49
58
  extra do
50
59
  {
@@ -66,12 +75,45 @@ module OmniAuth
66
75
  }
67
76
  end
68
77
 
78
+ def authorize_params
79
+ super.tap do |params|
80
+ AUTH_OPTIONS.each do |key|
81
+ value = request.params[key.to_s]
82
+ params[key] = value if value && !value.to_s.empty?
83
+ end
84
+ end
85
+ end
86
+
69
87
  def callback_url
70
88
  options.redirect_uri || (full_host + script_name + callback_path)
71
89
  end
72
90
 
73
91
  def raw_info
74
- @raw_info ||= access_token.get("/api/openid.connect.userInfo").parsed
92
+ @raw_info ||= fetch_and_validate_user_info
93
+ end
94
+
95
+ private
96
+
97
+ def fetch_and_validate_user_info
98
+ response = access_token.get("/api/openid.connect.userInfo").parsed
99
+ unless response.is_a?(Hash) && response["ok"] == true
100
+ error = response.is_a?(Hash) ? response["error"] : nil
101
+ raise CallbackError.new(
102
+ :invalid_credentials,
103
+ "Slack userInfo failed#{": #{error}" if error}"
104
+ )
105
+ end
106
+
107
+ team_id = response["https://slack.com/team_id"].to_s
108
+ user_id = response["https://slack.com/user_id"].to_s
109
+ if team_id.empty? || user_id.empty?
110
+ raise CallbackError.new(
111
+ :invalid_credentials,
112
+ "Slack userInfo missing team_id or user_id"
113
+ )
114
+ end
115
+
116
+ response
75
117
  end
76
118
  end
77
119
  end
@@ -1 +1 @@
1
- require 'omniauth/slack_openid'
1
+ require "omniauth/slack_openid"
@@ -1,11 +1,8 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
1
  Gem::Specification.new do |gem|
4
2
  gem.name = "omniauth-slack-openid"
5
- gem.version = File.read(File.expand_path('../lib/omniauth/slack_openid.rb', __FILE__)).match(/VERSION\s*=\s*'(.*?)'/)[1]
3
+ gem.version = File.read(File.expand_path("../lib/omniauth/slack_openid.rb", __FILE__)).match(/VERSION\s*=\s*"(.*?)"/)[1]
6
4
 
7
- repository_url = "https://github.com/amkisko/omniauth-slack-openid.rb"
8
- root_files = %w(CHANGELOG.md LICENSE.md README.md)
5
+ root_files = %w[CHANGELOG.md LICENSE.md README.md]
9
6
  root_files << "#{gem.name}.gemspec"
10
7
 
11
8
  gem.license = "MIT"
@@ -13,32 +10,44 @@ Gem::Specification.new do |gem|
13
10
  gem.platform = Gem::Platform::RUBY
14
11
 
15
12
  gem.authors = ["Andrei Makarov"]
16
- gem.email = ["andrei@kiskolabs.com"]
17
- gem.homepage = repository_url
18
- gem.summary = %q{An OmniAuth strategy for implementing Sign-in with Slack using OpenID Connect}
13
+ gem.email = ["contact@kiskolabs.com"]
14
+ gem.homepage = "https://github.com/amkisko/omniauth-slack-openid.rb"
15
+ gem.summary = "An OmniAuth strategy for implementing Sign-in with Slack using OpenID Connect"
19
16
  gem.description = gem.summary
20
17
  gem.metadata = {
21
- "homepage" => repository_url,
22
- "source_code_uri" => repository_url,
23
- "bug_tracker_uri" => "#{repository_url}/issues",
24
- "changelog_uri" => "#{repository_url}/blob/main/CHANGELOG.md",
18
+ "homepage" => "https://github.com/amkisko/omniauth-slack-openid.rb",
19
+ "source_code_uri" => "https://github.com/amkisko/omniauth-slack-openid.rb",
20
+ "bug_tracker_uri" => "https://github.com/amkisko/omniauth-slack-openid.rb/issues",
21
+ "changelog_uri" => "https://github.com/amkisko/omniauth-slack-openid.rb/blob/main/CHANGELOG.md",
25
22
  "rubygems_mfa_required" => "true"
26
23
  }
27
24
 
28
- gem.executables = Dir.glob("bin/*").map{ |f| File.basename(f) }
29
- gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("bin/**/*") + root_files
30
- gem.test_files = Dir.glob("spec/**/*_spec.rb")
25
+ gem.executables = Dir.glob("bin/*").map { |f| File.basename(f) }
26
+ gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("bin/**/*") + Dir.glob("sig/**/*.rbs") + root_files
31
27
 
32
- gem.required_ruby_version = ">= 2.5.0"
28
+ gem.required_ruby_version = ">= 3.4"
33
29
  gem.require_paths = ["lib"]
34
30
 
35
- gem.add_runtime_dependency 'omniauth', '~> 2'
36
- gem.add_runtime_dependency 'omniauth-oauth2', '~> 1'
37
-
38
- gem.add_development_dependency 'bundler', '~> 2'
39
- gem.add_development_dependency 'rake', '~> 13'
40
- gem.add_development_dependency 'rspec', '~> 3'
41
- gem.add_development_dependency 'pry', '~> 0.14'
42
- gem.add_development_dependency 'simplecov', '~> 0.21'
43
- gem.add_development_dependency 'simplecov-cobertura', '~> 2'
31
+ gem.add_runtime_dependency "omniauth", "~> 2.0"
32
+ gem.add_runtime_dependency "omniauth-oauth2", "~> 1.8"
33
+ gem.add_runtime_dependency "oauth2", "~> 2.0", ">= 2.0.25"
34
+ gem.add_runtime_dependency "base64"
35
+
36
+ gem.add_development_dependency "rake", "~> 13"
37
+ gem.add_development_dependency "rspec", "~> 3"
38
+ gem.add_development_dependency "pry", "~> 0.15"
39
+ gem.add_development_dependency "polyrun", ">= 2.2.0"
40
+ gem.add_development_dependency "bundler-audit", "~> 0.9"
41
+ gem.add_development_dependency "rspec_junit_formatter", "~> 0.6"
42
+ gem.add_development_dependency "bigdecimal"
43
+ gem.add_development_dependency "ostruct"
44
+ gem.add_development_dependency "tsort"
45
+ gem.add_development_dependency "standard", "~> 1.52"
46
+ gem.add_development_dependency "standard-custom", "~> 1.0"
47
+ gem.add_development_dependency "standard-performance", "~> 1.8"
48
+ gem.add_development_dependency "standard-rspec", "~> 0.3"
49
+ gem.add_development_dependency "rubocop-rspec", "~> 3.8"
50
+ gem.add_development_dependency "rubocop-thread_safety", "~> 0.7"
51
+ gem.add_development_dependency "appraisal", "~> 2"
52
+ gem.add_development_dependency "rbs", "~> 4"
44
53
  end
@@ -0,0 +1,6 @@
1
+ module OmniAuth
2
+ module SlackOpenid
3
+ VERSION: String
4
+ end
5
+ end
6
+
@@ -0,0 +1,47 @@
1
+ module OmniAuth
2
+ module Strategies
3
+ class SlackOpenid < OmniAuth::Strategies::OAuth2
4
+ AUTH_OPTIONS: Array[Symbol]
5
+
6
+ class INFO_DATA < Struct
7
+ attr_reader user_id: String?
8
+ attr_reader team_id: String?
9
+ attr_reader email: String?
10
+ attr_reader email_verified: bool?
11
+ attr_reader name: String?
12
+ attr_reader picture: String?
13
+ attr_reader given_name: String?
14
+ attr_reader family_name: String?
15
+ attr_reader locale: String?
16
+ attr_reader team_name: String?
17
+ attr_reader team_domain: String?
18
+
19
+ def initialize: (
20
+ ?user_id: String?,
21
+ ?team_id: String?,
22
+ ?email: String?,
23
+ ?email_verified: bool?,
24
+ ?name: String?,
25
+ ?picture: String?,
26
+ ?given_name: String?,
27
+ ?family_name: String?,
28
+ ?locale: String?,
29
+ ?team_name: String?,
30
+ ?team_domain: String?
31
+ ) -> void
32
+ end
33
+
34
+ def self.generate_uid: (String? team_id, String? user_id) -> String
35
+
36
+ def authorize_params: () -> Hash[Symbol, untyped]
37
+
38
+ def callback_url: () -> String
39
+
40
+ def raw_info: () -> Hash[String, untyped]
41
+
42
+ private
43
+
44
+ def fetch_and_validate_user_info: () -> Hash[String, untyped]
45
+ end
46
+ end
47
+ end
data/sig/omniauth.rbs ADDED
@@ -0,0 +1,3 @@
1
+ # Type signatures for OmniAuth::SlackOpenid
2
+ # See individual files in sig/omniauth/ for detailed signatures
3
+
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-slack-openid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-08-30 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: omniauth
@@ -16,42 +15,62 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '2'
18
+ version: '2.0'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '2'
25
+ version: '2.0'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: omniauth-oauth2
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '1'
32
+ version: '1.8'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '1'
39
+ version: '1.8'
41
40
  - !ruby/object:Gem::Dependency
42
- name: bundler
41
+ name: oauth2
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
- version: '2'
48
- type: :development
46
+ version: '2.0'
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 2.0.25
50
+ type: :runtime
49
51
  prerelease: false
50
52
  version_requirements: !ruby/object:Gem::Requirement
51
53
  requirements:
52
54
  - - "~>"
53
55
  - !ruby/object:Gem::Version
54
- version: '2'
56
+ version: '2.0'
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 2.0.25
60
+ - !ruby/object:Gem::Dependency
61
+ name: base64
62
+ requirement: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ type: :runtime
68
+ prerelease: false
69
+ version_requirements: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
55
74
  - !ruby/object:Gem::Dependency
56
75
  name: rake
57
76
  requirement: !ruby/object:Gem::Requirement
@@ -86,30 +105,184 @@ dependencies:
86
105
  requirements:
87
106
  - - "~>"
88
107
  - !ruby/object:Gem::Version
89
- version: '0.14'
108
+ version: '0.15'
90
109
  type: :development
91
110
  prerelease: false
92
111
  version_requirements: !ruby/object:Gem::Requirement
93
112
  requirements:
94
113
  - - "~>"
95
114
  - !ruby/object:Gem::Version
96
- version: '0.14'
115
+ version: '0.15'
116
+ - !ruby/object:Gem::Dependency
117
+ name: polyrun
118
+ requirement: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 2.2.0
123
+ type: :development
124
+ prerelease: false
125
+ version_requirements: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: 2.2.0
97
130
  - !ruby/object:Gem::Dependency
98
- name: simplecov
131
+ name: bundler-audit
99
132
  requirement: !ruby/object:Gem::Requirement
100
133
  requirements:
101
134
  - - "~>"
102
135
  - !ruby/object:Gem::Version
103
- version: '0.21'
136
+ version: '0.9'
104
137
  type: :development
105
138
  prerelease: false
106
139
  version_requirements: !ruby/object:Gem::Requirement
107
140
  requirements:
108
141
  - - "~>"
109
142
  - !ruby/object:Gem::Version
110
- version: '0.21'
143
+ version: '0.9'
111
144
  - !ruby/object:Gem::Dependency
112
- name: simplecov-cobertura
145
+ name: rspec_junit_formatter
146
+ requirement: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - "~>"
149
+ - !ruby/object:Gem::Version
150
+ version: '0.6'
151
+ type: :development
152
+ prerelease: false
153
+ version_requirements: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - "~>"
156
+ - !ruby/object:Gem::Version
157
+ version: '0.6'
158
+ - !ruby/object:Gem::Dependency
159
+ name: bigdecimal
160
+ requirement: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ type: :development
166
+ prerelease: false
167
+ version_requirements: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - ">="
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ - !ruby/object:Gem::Dependency
173
+ name: ostruct
174
+ requirement: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: '0'
179
+ type: :development
180
+ prerelease: false
181
+ version_requirements: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - ">="
184
+ - !ruby/object:Gem::Version
185
+ version: '0'
186
+ - !ruby/object:Gem::Dependency
187
+ name: tsort
188
+ requirement: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
193
+ type: :development
194
+ prerelease: false
195
+ version_requirements: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - ">="
198
+ - !ruby/object:Gem::Version
199
+ version: '0'
200
+ - !ruby/object:Gem::Dependency
201
+ name: standard
202
+ requirement: !ruby/object:Gem::Requirement
203
+ requirements:
204
+ - - "~>"
205
+ - !ruby/object:Gem::Version
206
+ version: '1.52'
207
+ type: :development
208
+ prerelease: false
209
+ version_requirements: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - "~>"
212
+ - !ruby/object:Gem::Version
213
+ version: '1.52'
214
+ - !ruby/object:Gem::Dependency
215
+ name: standard-custom
216
+ requirement: !ruby/object:Gem::Requirement
217
+ requirements:
218
+ - - "~>"
219
+ - !ruby/object:Gem::Version
220
+ version: '1.0'
221
+ type: :development
222
+ prerelease: false
223
+ version_requirements: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - "~>"
226
+ - !ruby/object:Gem::Version
227
+ version: '1.0'
228
+ - !ruby/object:Gem::Dependency
229
+ name: standard-performance
230
+ requirement: !ruby/object:Gem::Requirement
231
+ requirements:
232
+ - - "~>"
233
+ - !ruby/object:Gem::Version
234
+ version: '1.8'
235
+ type: :development
236
+ prerelease: false
237
+ version_requirements: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - "~>"
240
+ - !ruby/object:Gem::Version
241
+ version: '1.8'
242
+ - !ruby/object:Gem::Dependency
243
+ name: standard-rspec
244
+ requirement: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - "~>"
247
+ - !ruby/object:Gem::Version
248
+ version: '0.3'
249
+ type: :development
250
+ prerelease: false
251
+ version_requirements: !ruby/object:Gem::Requirement
252
+ requirements:
253
+ - - "~>"
254
+ - !ruby/object:Gem::Version
255
+ version: '0.3'
256
+ - !ruby/object:Gem::Dependency
257
+ name: rubocop-rspec
258
+ requirement: !ruby/object:Gem::Requirement
259
+ requirements:
260
+ - - "~>"
261
+ - !ruby/object:Gem::Version
262
+ version: '3.8'
263
+ type: :development
264
+ prerelease: false
265
+ version_requirements: !ruby/object:Gem::Requirement
266
+ requirements:
267
+ - - "~>"
268
+ - !ruby/object:Gem::Version
269
+ version: '3.8'
270
+ - !ruby/object:Gem::Dependency
271
+ name: rubocop-thread_safety
272
+ requirement: !ruby/object:Gem::Requirement
273
+ requirements:
274
+ - - "~>"
275
+ - !ruby/object:Gem::Version
276
+ version: '0.7'
277
+ type: :development
278
+ prerelease: false
279
+ version_requirements: !ruby/object:Gem::Requirement
280
+ requirements:
281
+ - - "~>"
282
+ - !ruby/object:Gem::Version
283
+ version: '0.7'
284
+ - !ruby/object:Gem::Dependency
285
+ name: appraisal
113
286
  requirement: !ruby/object:Gem::Requirement
114
287
  requirements:
115
288
  - - "~>"
@@ -122,10 +295,24 @@ dependencies:
122
295
  - - "~>"
123
296
  - !ruby/object:Gem::Version
124
297
  version: '2'
298
+ - !ruby/object:Gem::Dependency
299
+ name: rbs
300
+ requirement: !ruby/object:Gem::Requirement
301
+ requirements:
302
+ - - "~>"
303
+ - !ruby/object:Gem::Version
304
+ version: '4'
305
+ type: :development
306
+ prerelease: false
307
+ version_requirements: !ruby/object:Gem::Requirement
308
+ requirements:
309
+ - - "~>"
310
+ - !ruby/object:Gem::Version
311
+ version: '4'
125
312
  description: An OmniAuth strategy for implementing Sign-in with Slack using OpenID
126
313
  Connect
127
314
  email:
128
- - andrei@kiskolabs.com
315
+ - contact@kiskolabs.com
129
316
  executables: []
130
317
  extensions: []
131
318
  extra_rdoc_files: []
@@ -137,7 +324,9 @@ files:
137
324
  - lib/omniauth/slack_openid.rb
138
325
  - lib/omniauth/strategies/slack_openid.rb
139
326
  - omniauth-slack-openid.gemspec
140
- - spec/omniauth/strategies/slack_openid_spec.rb
327
+ - sig/omniauth.rbs
328
+ - sig/omniauth/slack_openid.rbs
329
+ - sig/omniauth/strategies/slack_openid.rbs
141
330
  homepage: https://github.com/amkisko/omniauth-slack-openid.rb
142
331
  licenses:
143
332
  - MIT
@@ -147,7 +336,6 @@ metadata:
147
336
  bug_tracker_uri: https://github.com/amkisko/omniauth-slack-openid.rb/issues
148
337
  changelog_uri: https://github.com/amkisko/omniauth-slack-openid.rb/blob/main/CHANGELOG.md
149
338
  rubygems_mfa_required: 'true'
150
- post_install_message:
151
339
  rdoc_options: []
152
340
  require_paths:
153
341
  - lib
@@ -155,16 +343,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
343
  requirements:
156
344
  - - ">="
157
345
  - !ruby/object:Gem::Version
158
- version: 2.5.0
346
+ version: '3.4'
159
347
  required_rubygems_version: !ruby/object:Gem::Requirement
160
348
  requirements:
161
349
  - - ">="
162
350
  - !ruby/object:Gem::Version
163
351
  version: '0'
164
352
  requirements: []
165
- rubygems_version: 3.4.19
166
- signing_key:
353
+ rubygems_version: 4.0.6
167
354
  specification_version: 4
168
355
  summary: An OmniAuth strategy for implementing Sign-in with Slack using OpenID Connect
169
- test_files:
170
- - spec/omniauth/strategies/slack_openid_spec.rb
356
+ test_files: []
@@ -1,71 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe OmniAuth::Strategies::SlackOpenid do
4
- let(:user_name) { 'brent' }
5
- let(:user_email) { 'bront@slack-corp.com' }
6
- let(:raw_info) {
7
- {
8
- "ok" => true,
9
- "sub" => "U0R7JM",
10
- "https://slack.com/user_id" => "U0R7JM",
11
- "https://slack.com/team_id" => "T0R7GR",
12
- "email" => user_email,
13
- "email_verified" => true,
14
- "date_email_verified" => 1622128723,
15
- "name" => user_name,
16
- "picture" => "https://secure.gravatar.com/....png",
17
- "given_name" => "Bront",
18
- "family_name" => "Labradoodle",
19
- "locale" => "en-US",
20
- "https://slack.com/team_name" => "kraneflannel",
21
- "https://slack.com/team_domain" => "kraneflannel",
22
- "https://slack.com/user_image_24" => "...",
23
- "https://slack.com/user_image_32" => "...",
24
- "https://slack.com/user_image_48" => "...",
25
- "https://slack.com/user_image_72" => "...",
26
- "https://slack.com/user_image_192" => "...",
27
- "https://slack.com/user_image_512" => "...",
28
- "https://slack.com/team_image_34" => "...",
29
- "https://slack.com/team_image_44" => "...",
30
- "https://slack.com/team_image_68" => "...",
31
- "https://slack.com/team_image_88" => "...",
32
- "https://slack.com/team_image_102" => "...",
33
- "https://slack.com/team_image_132" => "...",
34
- "https://slack.com/team_image_230" => "...",
35
- "https://slack.com/team_image_default" => true
36
- }
37
- }
38
- let(:dummy_rack_app) { [200, {}, ['dummy']] }
39
- let(:options) { {} }
40
-
41
- subject(:strategy) { OmniAuth::Strategies::SlackOpenid.new(dummy_rack_app, options) }
42
-
43
- describe 'options' do
44
- subject { strategy.options }
45
-
46
- it { expect(subject.client_options.site).to eq('https://slack.com') }
47
- it { expect(subject.client_options.authorize_url).to eq('/openid/connect/authorize') }
48
- it { expect(subject.client_options.token_url).to eq('/api/openid.connect.token') }
49
- end
50
-
51
- describe '#info' do
52
- before do
53
- allow(strategy).to receive(:raw_info) { raw_info }
54
- end
55
-
56
- subject { strategy.info }
57
-
58
- it { expect(subject[:name]).to eq(user_name) }
59
- it { expect(subject[:email]).to eq(user_email) }
60
- end
61
-
62
- describe '#uid' do
63
- before do
64
- allow(strategy).to receive(:raw_info) { raw_info }
65
- end
66
-
67
- subject { strategy.uid }
68
-
69
- it { expect(subject).to eq('T0R7GR-U0R7JM') }
70
- end
71
- end