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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +20 -0
- data/lib/omniauth/slack_openid.rb +6 -1
- data/omniauth-slack-openid.gemspec +5 -4
- metadata +39 -12
- data/lib/omniauth/slack_openid/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02130b57c0ff92e467c30b1e9df105f23d1190bdac4d68be5d2e8bd817773955
|
4
|
+
data.tar.gz: 6d2d93bd438b18a247c6451758914b845547a5210211bcf0616d06fb103532c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18a74a7aaa09610bc9ed51fa411a34e220e2f1937ce2fe5c442cc2e4cef5b872ae36bbc08199671df75216319e88b350bc4b83387130a8678b5117055c03dba9
|
7
|
+
data.tar.gz: 173046f143f75bf724628c237c6c52fe6a30bb2f61f977d7ec1139544b87017a526f65f33e5d509d328ff1ad45c03cbdf33a665656157e303ed730c4766755e9
|
data/CHANGELOG.md
CHANGED
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,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 =
|
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 = ">=
|
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
|
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-
|
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:
|
70
|
+
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
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: '
|
82
|
+
version: '3'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: pry
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
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: '
|
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:
|
158
|
+
version: 2.5.0
|
132
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
160
|
requirements:
|
134
161
|
- - ">="
|