omniauth-lever 0.2.0 → 0.4.0
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 +4 -4
- data/CHANGELOG.md +35 -0
- data/Gemfile.lock +13 -9
- data/lib/omniauth/lever/version.rb +1 -1
- data/lib/omniauth/lever.rb +1 -7
- data/lib/omniauth/strategies/lever.rb +30 -1
- data/lib/omniauth-lever.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2ae702d0997c6ba83769bdc3bb43f8ae7a1888194ee22ce40a3d71830197254
|
4
|
+
data.tar.gz: 13eb36bcbe5b48a7de9b8621175b1cc48ebaa430bc3567271ebc967ad62b0ffd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a4c074801284c40115bfe71f8c32431bfc6d90713a8c7aa0ea498a3138d164665dbaadfc9f2796c5cf46548aa56de6ff882863c45498cbf37e8c9fa7c7d43a7
|
7
|
+
data.tar.gz: 9a7192ffb4077e8bb4605a1128e8020a70b23853ad3264d9c5bbeb4293baeeded7bc5c4e18d3a8e016fa3800979cedf6d1f96adb767e452123c23640745ed8bf
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,40 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.4.0](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.3.1...v0.4.0) (2022-01-25)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* SL-811 Add opportunities stages scopes ([3b76c57](https://www.github.com/ScreenLoop/omniauth-lever/commit/3b76c5776bc4ac90464c5268aea56b5135dcc861))
|
9
|
+
|
10
|
+
### [0.3.1](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.3.0...v0.3.1) (2021-09-24)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* Add audience option ([6e06fe6](https://www.github.com/ScreenLoop/omniauth-lever/commit/6e06fe6b8fb156a4bc7775283d29ede714c4fd80))
|
16
|
+
|
17
|
+
### [0.3.1](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.3.0...v0.3.1) (2021-09-24)
|
18
|
+
|
19
|
+
|
20
|
+
### Bug Fixes
|
21
|
+
|
22
|
+
* Add audience option ([6e06fe6](https://www.github.com/ScreenLoop/omniauth-lever/commit/6e06fe6b8fb156a4bc7775283d29ede714c4fd80))
|
23
|
+
|
24
|
+
## [0.3.0](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.2.1...v0.3.0) (2021-09-16)
|
25
|
+
|
26
|
+
|
27
|
+
### Features
|
28
|
+
|
29
|
+
* Add support to sandbox instance ([12a9531](https://www.github.com/ScreenLoop/omniauth-lever/commit/12a9531d888cb8c50312d36ddcf24830517e83ee))
|
30
|
+
|
31
|
+
### [0.2.1](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.2.0...v0.2.1) (2021-09-13)
|
32
|
+
|
33
|
+
|
34
|
+
### Bug Fixes
|
35
|
+
|
36
|
+
* Fix imports for omniauth-lever gem ([f26ea25](https://www.github.com/ScreenLoop/omniauth-lever/commit/f26ea25a1c43abdbb01a0d6122cf7618e40bf25d))
|
37
|
+
|
3
38
|
## [0.2.0](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.1.1...v0.2.0) (2021-09-10)
|
4
39
|
|
5
40
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
omniauth-lever (0.
|
4
|
+
omniauth-lever (0.4.0)
|
5
5
|
omniauth (~> 2.0)
|
6
6
|
omniauth-oauth2 (~> 1.7.1)
|
7
7
|
|
@@ -10,27 +10,31 @@ GEM
|
|
10
10
|
specs:
|
11
11
|
ast (2.4.2)
|
12
12
|
diff-lcs (1.4.4)
|
13
|
-
faraday (1.
|
13
|
+
faraday (1.9.3)
|
14
14
|
faraday-em_http (~> 1.0)
|
15
15
|
faraday-em_synchrony (~> 1.0)
|
16
16
|
faraday-excon (~> 1.1)
|
17
|
-
faraday-httpclient (~> 1.0
|
17
|
+
faraday-httpclient (~> 1.0)
|
18
|
+
faraday-multipart (~> 1.0)
|
18
19
|
faraday-net_http (~> 1.0)
|
19
|
-
faraday-net_http_persistent (~> 1.
|
20
|
+
faraday-net_http_persistent (~> 1.0)
|
20
21
|
faraday-patron (~> 1.0)
|
21
22
|
faraday-rack (~> 1.0)
|
22
|
-
|
23
|
+
faraday-retry (~> 1.0)
|
23
24
|
ruby2_keywords (>= 0.0.4)
|
24
25
|
faraday-em_http (1.0.0)
|
25
26
|
faraday-em_synchrony (1.0.0)
|
26
27
|
faraday-excon (1.1.0)
|
27
28
|
faraday-httpclient (1.0.1)
|
29
|
+
faraday-multipart (1.0.3)
|
30
|
+
multipart-post (>= 1.2, < 3)
|
28
31
|
faraday-net_http (1.0.1)
|
29
32
|
faraday-net_http_persistent (1.2.0)
|
30
33
|
faraday-patron (1.0.0)
|
31
34
|
faraday-rack (1.0.0)
|
32
|
-
|
33
|
-
|
35
|
+
faraday-retry (1.0.3)
|
36
|
+
hashie (5.0.0)
|
37
|
+
jwt (2.3.0)
|
34
38
|
multi_json (1.15.0)
|
35
39
|
multi_xml (0.6.0)
|
36
40
|
multipart-post (2.1.1)
|
@@ -44,7 +48,7 @@ GEM
|
|
44
48
|
hashie (>= 3.4.6)
|
45
49
|
rack (>= 1.6.2, < 3)
|
46
50
|
rack-protection
|
47
|
-
omniauth-oauth2 (1.7.
|
51
|
+
omniauth-oauth2 (1.7.2)
|
48
52
|
oauth2 (~> 1.4)
|
49
53
|
omniauth (>= 1.9, < 3)
|
50
54
|
parallel (1.20.1)
|
@@ -99,4 +103,4 @@ DEPENDENCIES
|
|
99
103
|
rubocop-rspec (~> 2.4.0)
|
100
104
|
|
101
105
|
BUNDLED WITH
|
102
|
-
2.
|
106
|
+
2.2.20
|
data/lib/omniauth/lever.rb
CHANGED
@@ -7,13 +7,42 @@ require 'omniauth-oauth2'
|
|
7
7
|
module OmniAuth
|
8
8
|
module Strategies
|
9
9
|
class Lever < OmniAuth::Strategies::OAuth2
|
10
|
+
DEFAULT_PROMPT = 'consent'
|
11
|
+
DEFAULT_RESPONSE_TYPE = 'code'
|
12
|
+
DEFAULT_SCOPE = 'offline_access stages:read:admin opportunities:write:admin opportunities:read:admin archive_reasons:read:admin users:read:admin interviews:read:admin postings:read:admin feedback_templates:read:admin notes:write:admin'
|
13
|
+
SANDBOX_OAUTH_URL = 'https://sandbox-lever.auth0.com'
|
14
|
+
SANDBOX_CLIENT_OPTIONS = {
|
15
|
+
site: 'https://api.sandbox.lever.co/v1',
|
16
|
+
audience: 'https://api.sandbox.lever.co/v1/',
|
17
|
+
authorize_url: "#{SANDBOX_OAUTH_URL}/authorize",
|
18
|
+
token_url: "#{SANDBOX_OAUTH_URL}/oauth/token",
|
19
|
+
}
|
20
|
+
|
10
21
|
option :name, 'lever'
|
11
22
|
|
12
23
|
option :client_options, {
|
13
24
|
site: 'https://api.lever.co/v1',
|
25
|
+
audience: 'https://api.lever.co/v1/',
|
14
26
|
authorize_url: 'https://auth.lever.co/authorize',
|
15
|
-
token_url: 'oauth/token',
|
27
|
+
token_url: 'https://auth.lever.co/oauth/token',
|
16
28
|
}
|
29
|
+
|
30
|
+
option :authorize_options, [:prompt, :response_type, :scope]
|
31
|
+
option :sandbox, false
|
32
|
+
|
33
|
+
def setup_phase
|
34
|
+
options.client_options.merge!(SANDBOX_CLIENT_OPTIONS) if options.sandbox
|
35
|
+
super
|
36
|
+
end
|
37
|
+
|
38
|
+
def authorize_params
|
39
|
+
super.tap do |params|
|
40
|
+
params[:prompt] ||= DEFAULT_PROMPT
|
41
|
+
params[:response_type] ||= DEFAULT_RESPONSE_TYPE
|
42
|
+
params[:scope] ||= DEFAULT_SCOPE
|
43
|
+
params[:audience] ||= options.client_options[:audience]
|
44
|
+
end
|
45
|
+
end
|
17
46
|
end
|
18
47
|
end
|
19
48
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'omniauth/lever'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-lever
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Santos
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- Rakefile
|
85
85
|
- bin/console
|
86
86
|
- bin/setup
|
87
|
+
- lib/omniauth-lever.rb
|
87
88
|
- lib/omniauth/lever.rb
|
88
89
|
- lib/omniauth/lever/version.rb
|
89
90
|
- lib/omniauth/strategies/lever.rb
|