omniauth-slack-openid 1.0.1 → 1.1.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: 22c152396744bfdc8f5d14e14e67a12b14fe4028b3c2c8f47c4182f9e7283923
4
- data.tar.gz: 5871e8851226ae3df14e2d9525963eb95d6462d8fc71275067d5158e122aa2f1
3
+ metadata.gz: 02130b57c0ff92e467c30b1e9df105f23d1190bdac4d68be5d2e8bd817773955
4
+ data.tar.gz: 6d2d93bd438b18a247c6451758914b845547a5210211bcf0616d06fb103532c7
5
5
  SHA512:
6
- metadata.gz: ee66f69bbd9efb97a99cf7b6211f3cd0558105a4f9da1d75c648459aa85cba7083a1ebea5f7e24a5b66116ffcb30cd983f7e007014526979a3ca40238421c666
7
- data.tar.gz: 18222546197048093572c967c7086215485785c24177ff85329746e91d85cc5d62e507b3ca38ebe235220de0731680f1eb7dc4c3ea4b30b409fa763c3f5669d4
6
+ metadata.gz: 18a74a7aaa09610bc9ed51fa411a34e220e2f1937ce2fe5c442cc2e4cef5b872ae36bbc08199671df75216319e88b350bc4b83387130a8678b5117055c03dba9
7
+ data.tar.gz: 173046f143f75bf724628c237c6c52fe6a30bb2f61f977d7ec1139544b87017a526f65f33e5d509d328ff1ad45c03cbdf33a665656157e303ed730c4766755e9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 1.1.0
2
+
3
+ * Set minimum ruby version requirement to 2.5.0
4
+
5
+ # 1.0.2
6
+
7
+ * Updated gem configuration
8
+
1
9
  # 1.0.1
2
10
 
3
11
  * Updated gem description
data/README.md CHANGED
@@ -28,6 +28,15 @@ gem 'omniauth-slack-openid'
28
28
 
29
29
  ## Usage with Devise
30
30
 
31
+ Create Slack app and configure OAuth & Permissions to have the following Redirect URLs:
32
+ - https://localhost:3000/user/auth/slack_openid/callback
33
+
34
+ Copy `Client ID` and `Client Secret` to your environment (e.g. `.env.local` file):
35
+ ```sh
36
+ SLACK_CLIENT_ID=1234567890.1234567890
37
+ SLACK_CLIENT_SECRET=1234567890abcdef1234567890abcdef
38
+ ```
39
+
31
40
  Add the following to your `config/initializers/devise.rb`:
32
41
 
33
42
  ```ruby
@@ -45,6 +54,17 @@ Add the following to your `config/initializers/devise.rb`:
45
54
 
46
55
  In order to test the callback in development, try logging in and then manually update URL to use http instead of https.
47
56
 
57
+ ## Generating uid
58
+
59
+ Gem has own `generate_uid` method that concatenates `team_id` and `user_id`, you can use it with custom parameters:
60
+
61
+ ```ruby
62
+ def resolve_user_session(team_id, user_id)
63
+ uid = OmniAuth::Strategies::SlackOpenid.generate_uid(team_id, user_id)
64
+ UserSession.find_by(uid: uid, provider: "slack-openid")
65
+ end
66
+ ```
67
+
48
68
  ## Contributing
49
69
 
50
70
  Bug reports and pull requests are welcome on GitHub at https://github.com/amkisko/omniauth-slack-openid.rb
@@ -1,2 +1,7 @@
1
- require 'omniauth/slack_openid/version'
2
1
  require 'omniauth/strategies/slack_openid'
2
+
3
+ module OmniAuth
4
+ module SlackOpenid
5
+ VERSION = '1.1.0'
6
+ end
7
+ end
@@ -1,9 +1,8 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/omniauth/slack_openid/version', __FILE__)
3
2
 
4
3
  Gem::Specification.new do |gem|
5
4
  gem.name = "omniauth-slack-openid"
6
- gem.version = OmniAuth::SlackOpenid::VERSION
5
+ gem.version = File.read(File.expand_path('../lib/omniauth/slack_openid.rb', __FILE__)).match(/VERSION\s*=\s*'(.*?)'/)[1]
7
6
 
8
7
  repository_url = "https://github.com/amkisko/omniauth-slack-openid.rb"
9
8
  root_files = %w(CHANGELOG.md LICENSE.md README.md)
@@ -30,7 +29,7 @@ Gem::Specification.new do |gem|
30
29
  gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("bin/**/*") + root_files
31
30
  gem.test_files = Dir.glob("spec/**/*_spec.rb")
32
31
 
33
- gem.required_ruby_version = ">= 1.9.3"
32
+ gem.required_ruby_version = ">= 2.5.0"
34
33
  gem.require_paths = ["lib"]
35
34
 
36
35
  gem.add_runtime_dependency 'omniauth', '~> 2'
@@ -38,6 +37,8 @@ Gem::Specification.new do |gem|
38
37
 
39
38
  gem.add_development_dependency 'bundler', '~> 2'
40
39
  gem.add_development_dependency 'rake', '~> 13'
41
- gem.add_development_dependency 'pry-byebug'
42
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'
43
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-slack-openid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-28 00:00:00.000000000 Z
11
+ date: 2023-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -67,33 +67,61 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '13'
69
69
  - !ruby/object:Gem::Dependency
70
- name: pry-byebug
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '3'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rspec
84
+ name: pry
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3'
89
+ version: '0.14'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3'
96
+ version: '0.14'
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.21'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.21'
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov-cobertura
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '2'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '2'
97
125
  description: An OmniAuth strategy for implementing Sign-in with Slack using OpenID
98
126
  Connect
99
127
  email:
@@ -107,7 +135,6 @@ files:
107
135
  - README.md
108
136
  - lib/omniauth-slack-openid.rb
109
137
  - lib/omniauth/slack_openid.rb
110
- - lib/omniauth/slack_openid/version.rb
111
138
  - lib/omniauth/strategies/slack_openid.rb
112
139
  - omniauth-slack-openid.gemspec
113
140
  - spec/omniauth/strategies/slack_openid_spec.rb
@@ -128,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
155
  requirements:
129
156
  - - ">="
130
157
  - !ruby/object:Gem::Version
131
- version: 1.9.3
158
+ version: 2.5.0
132
159
  required_rubygems_version: !ruby/object:Gem::Requirement
133
160
  requirements:
134
161
  - - ">="
@@ -1,5 +0,0 @@
1
- module OmniAuth
2
- module SlackOpenid
3
- VERSION = '1.0.1'
4
- end
5
- end