omniauth-lever 0.2.1 → 0.3.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 +7 -0
- data/Gemfile.lock +2 -2
- data/lib/omniauth/lever/version.rb +1 -1
- data/lib/omniauth/strategies/lever.rb +27 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc26b031962eae11ecde27dc220a48df43a0c0b6013c30584446a7db8aaf5c23
|
4
|
+
data.tar.gz: 653c28cd1f76388f02562af025a26fbbf0fd491715508b8378c8f355f79b9712
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 880ba47d36e63d675992122a074296139947c1dfd55ea78ea0207456def12aef3c917ba0255aba659118bf9364cd61a1f34a4907c771cbfe827601162c9d0652
|
7
|
+
data.tar.gz: 5f7e66d981229818d3b2dc57e03ee9fc1157a69dfa1a3bcae636f118d13de92a4eb723b43a72f23134be457550abf36a7a681600c451f87a4721640e40058af1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.3.0](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.2.1...v0.3.0) (2021-09-16)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* Add support to sandbox instance ([12a9531](https://www.github.com/ScreenLoop/omniauth-lever/commit/12a9531d888cb8c50312d36ddcf24830517e83ee))
|
9
|
+
|
3
10
|
### [0.2.1](https://www.github.com/ScreenLoop/omniauth-lever/compare/v0.2.0...v0.2.1) (2021-09-13)
|
4
11
|
|
5
12
|
|
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.3.0)
|
5
5
|
omniauth (~> 2.0)
|
6
6
|
omniauth-oauth2 (~> 1.7.1)
|
7
7
|
|
@@ -10,7 +10,7 @@ GEM
|
|
10
10
|
specs:
|
11
11
|
ast (2.4.2)
|
12
12
|
diff-lcs (1.4.4)
|
13
|
-
faraday (1.7.
|
13
|
+
faraday (1.7.2)
|
14
14
|
faraday-em_http (~> 1.0)
|
15
15
|
faraday-em_synchrony (~> 1.0)
|
16
16
|
faraday-excon (~> 1.1)
|
@@ -7,13 +7,39 @@ 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 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
|
+
authorize_url: "#{SANDBOX_OAUTH_URL}/authorize",
|
17
|
+
token_url: "#{SANDBOX_OAUTH_URL}/oauth/token",
|
18
|
+
}
|
19
|
+
|
10
20
|
option :name, 'lever'
|
11
21
|
|
12
22
|
option :client_options, {
|
13
23
|
site: 'https://api.lever.co/v1',
|
14
24
|
authorize_url: 'https://auth.lever.co/authorize',
|
15
|
-
token_url: 'oauth/token',
|
25
|
+
token_url: 'https://auth.lever.co/oauth/token',
|
16
26
|
}
|
27
|
+
|
28
|
+
option :authorize_options, [:prompt, :response_type, :scope]
|
29
|
+
option :sandbox, false
|
30
|
+
|
31
|
+
def setup_phase
|
32
|
+
options.client_options.merge!(SANDBOX_CLIENT_OPTIONS) if options.sandbox
|
33
|
+
super
|
34
|
+
end
|
35
|
+
|
36
|
+
def authorize_params
|
37
|
+
super.tap do |params|
|
38
|
+
params[:prompt] ||= DEFAULT_PROMPT
|
39
|
+
params[:response_type] ||= DEFAULT_RESPONSE_TYPE
|
40
|
+
params[:scope] ||= DEFAULT_SCOPE
|
41
|
+
end
|
42
|
+
end
|
17
43
|
end
|
18
44
|
end
|
19
45
|
end
|
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.3.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: 2021-09-
|
11
|
+
date: 2021-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|