descope 1.0.6 → 1.0.7
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/.github/workflows/ci.yaml +2 -2
- data/.github/workflows/publish-gem.yaml +10 -3
- data/.gitignore +2 -0
- data/.ruby-version +1 -1
- data/Gemfile +7 -7
- data/Gemfile.lock +68 -55
- data/README.md +159 -51
- data/examples/ruby-on-rails-api/descope/Gemfile +8 -8
- data/examples/ruby-on-rails-api/descope/Gemfile.lock +1 -1
- data/examples/ruby-on-rails-api/descope/package-lock.json +187 -131
- data/examples/ruby-on-rails-api/descope/package.json +1 -1
- data/examples/ruby-on-rails-api/descope/yarn.lock +182 -84
- data/lib/descope/api/v1/auth/enchantedlink.rb +3 -1
- data/lib/descope/api/v1/auth/magiclink.rb +3 -1
- data/lib/descope/api/v1/auth/otp.rb +3 -1
- data/lib/descope/api/v1/auth/password.rb +6 -2
- data/lib/descope/api/v1/auth/totp.rb +3 -1
- data/lib/descope/api/v1/auth.rb +47 -12
- data/lib/descope/api/v1/management/common.rb +20 -5
- data/lib/descope/api/v1/management/sso_application.rb +236 -0
- data/lib/descope/api/v1/management/sso_settings.rb +2 -24
- data/lib/descope/api/v1/management/user.rb +151 -13
- data/lib/descope/api/v1/management.rb +2 -0
- data/lib/descope/api/v1/session.rb +37 -4
- data/lib/descope/mixins/common.rb +1 -0
- data/lib/descope/mixins/http.rb +60 -9
- data/lib/descope/mixins/initializer.rb +2 -1
- data/lib/descope/mixins/logging.rb +12 -4
- data/lib/descope/version.rb +1 -1
- data/spec/descope/api/v1/auth_spec.rb +29 -0
- data/spec/descope/api/v1/auth_token_extraction_spec.rb +126 -0
- data/spec/descope/api/v1/session_refresh_spec.rb +98 -0
- data/spec/factories/user.rb +1 -1
- data/spec/integration/lib.descope/api/v1/auth/enchantedlink_spec.rb +1 -1
- data/spec/integration/lib.descope/api/v1/auth/magiclink_spec.rb +1 -1
- data/spec/integration/lib.descope/api/v1/auth/otp_spec.rb +1 -1
- data/spec/integration/lib.descope/api/v1/auth/session_spec.rb +49 -0
- data/spec/integration/lib.descope/api/v1/auth/totp_spec.rb +1 -1
- data/spec/integration/lib.descope/api/v1/management/access_key_spec.rb +3 -0
- data/spec/integration/lib.descope/api/v1/management/audit_spec.rb +5 -3
- data/spec/integration/lib.descope/api/v1/management/authz_spec.rb +2 -0
- data/spec/integration/lib.descope/api/v1/management/flow_spec.rb +3 -1
- data/spec/integration/lib.descope/api/v1/management/permissions_spec.rb +4 -2
- data/spec/integration/lib.descope/api/v1/management/project_spec.rb +2 -0
- data/spec/integration/lib.descope/api/v1/management/roles_spec.rb +2 -0
- data/spec/integration/lib.descope/api/v1/management/user_spec.rb +55 -6
- data/spec/lib.descope/api/v1/auth/enchantedlink_spec.rb +11 -2
- data/spec/lib.descope/api/v1/auth/password_spec.rb +10 -1
- data/spec/lib.descope/api/v1/auth_spec.rb +167 -5
- data/spec/lib.descope/api/v1/cookie_domain_fix_integration_spec.rb +245 -0
- data/spec/lib.descope/api/v1/management/sso_application_spec.rb +217 -0
- data/spec/lib.descope/api/v1/management/sso_settings_spec.rb +2 -2
- data/spec/lib.descope/api/v1/management/user_spec.rb +134 -46
- data/spec/lib.descope/api/v1/session_spec.rb +119 -6
- data/spec/lib.descope/mixins/http_spec.rb +218 -0
- data/spec/support/client_config.rb +0 -1
- data/spec/support/utils.rb +6 -0
- metadata +13 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b839423c554d63097d253ea7a62954d531d9a3b1b262dad0e82c22b52afa7b6f
|
|
4
|
+
data.tar.gz: '008848b04a02f4e47c138ebb4bfa46a4a8e5b1a796c21acf0d627ca28abe2071'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f3f9a015891fc9aa23c16a9274ab8529965f833223316f5c40c89e2b704ee69c5af7f9ffafab9b104e88085826c459c1f5ae41ea8488a6cc797a55a95c85d25
|
|
7
|
+
data.tar.gz: 4abc42cc41567a3c0a4079112dab7b3b9786e19f7c39f03447528cdfe44d7722404a55f4cb24e95d028ebbf4cb5860576577f82d1d4a3aa8935d0a06f5cb1329
|
data/.github/workflows/ci.yaml
CHANGED
|
@@ -22,9 +22,9 @@ jobs:
|
|
|
22
22
|
runs-on: ubuntu-latest
|
|
23
23
|
steps:
|
|
24
24
|
- name: Checkout Code
|
|
25
|
-
uses: actions/checkout@v4
|
|
25
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
26
26
|
|
|
27
|
-
- uses: ruby/setup-ruby@v1
|
|
27
|
+
- uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
|
28
28
|
with:
|
|
29
29
|
# We are not letting this step to run bundle install, we will do it later
|
|
30
30
|
bundler-cache: false
|
|
@@ -10,12 +10,12 @@ jobs:
|
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
steps:
|
|
12
12
|
- name: Checkout Code
|
|
13
|
-
uses: actions/checkout@v4
|
|
13
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
14
14
|
with:
|
|
15
15
|
ref: main
|
|
16
16
|
fetch-depth: 0
|
|
17
17
|
|
|
18
|
-
- uses: ruby/setup-ruby@v1
|
|
18
|
+
- uses: ruby/setup-ruby@2a7b30092b0caf9c046252510f9273b4875f3db9 # v1.254.0
|
|
19
19
|
with:
|
|
20
20
|
# We are not letting this step to run bundle install, we will do it later
|
|
21
21
|
bundler-cache: false
|
|
@@ -23,6 +23,13 @@ jobs:
|
|
|
23
23
|
- name: Install dependencies
|
|
24
24
|
run: bundle install
|
|
25
25
|
|
|
26
|
+
- name: Get token
|
|
27
|
+
id: get_token
|
|
28
|
+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
|
|
29
|
+
with:
|
|
30
|
+
private_key: ${{ secrets.RELEASE_APP_PEM }}
|
|
31
|
+
app_id: ${{ secrets.RELEASE_APP_ID }}
|
|
32
|
+
|
|
26
33
|
- name: Bump version
|
|
27
34
|
run: |
|
|
28
35
|
NEW_VERSION=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//') # strip the 'v' from the tag if present
|
|
@@ -38,7 +45,7 @@ jobs:
|
|
|
38
45
|
git commit -m "Bump version to $NEW_VERSION"
|
|
39
46
|
git push origin main
|
|
40
47
|
env:
|
|
41
|
-
GITHUB_TOKEN: ${{
|
|
48
|
+
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
|
|
42
49
|
|
|
43
50
|
- name: Repoint the tag to latest commit
|
|
44
51
|
run: |
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.4.5
|
data/Gemfile
CHANGED
|
@@ -4,17 +4,17 @@ source 'https://rubygems.org'
|
|
|
4
4
|
gemspec
|
|
5
5
|
|
|
6
6
|
group :development do
|
|
7
|
-
gem 'rubocop', '1.
|
|
8
|
-
gem 'rubocop-rails', '2.
|
|
7
|
+
gem 'rubocop', '1.79.0', require: false
|
|
8
|
+
gem 'rubocop-rails', '2.32.0', require: false
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
group :test do
|
|
12
|
-
gem 'factory_bot', '6.4
|
|
12
|
+
gem 'factory_bot', '6.5.4', require: false
|
|
13
13
|
gem 'faker', require: false
|
|
14
|
-
gem 'rack-test', '2.
|
|
14
|
+
gem 'rack-test', '2.2.0', require: false
|
|
15
15
|
gem 'rotp', '6.3.0', require: false
|
|
16
|
-
gem 'rspec', '3.13.
|
|
17
|
-
gem 'selenium-webdriver', '4.
|
|
16
|
+
gem 'rspec', '3.13.1', require: false
|
|
17
|
+
gem 'selenium-webdriver', '4.34.0', require: false
|
|
18
18
|
gem 'simplecov', '0.22.0', require: false
|
|
19
|
-
gem 'super_diff', '0.
|
|
19
|
+
gem 'super_diff', '0.16.0', require: false
|
|
20
20
|
end
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
descope (1.0.
|
|
4
|
+
descope (1.0.6)
|
|
5
5
|
addressable (~> 2.8)
|
|
6
6
|
jwt (~> 2.7)
|
|
7
7
|
rest-client (~> 2.1)
|
|
@@ -11,104 +11,114 @@ PATH
|
|
|
11
11
|
GEM
|
|
12
12
|
remote: https://rubygems.org/
|
|
13
13
|
specs:
|
|
14
|
-
activesupport (7.
|
|
14
|
+
activesupport (7.2.2.1)
|
|
15
15
|
base64
|
|
16
|
+
benchmark (>= 0.3)
|
|
16
17
|
bigdecimal
|
|
17
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
18
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
18
19
|
connection_pool (>= 2.2.5)
|
|
19
20
|
drb
|
|
20
21
|
i18n (>= 1.6, < 2)
|
|
22
|
+
logger (>= 1.4.2)
|
|
21
23
|
minitest (>= 5.1)
|
|
22
|
-
|
|
23
|
-
tzinfo (~> 2.0)
|
|
24
|
+
securerandom (>= 0.3)
|
|
25
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
24
26
|
addressable (2.8.6)
|
|
25
27
|
public_suffix (>= 2.0.2, < 6.0)
|
|
26
|
-
ast (2.4.
|
|
28
|
+
ast (2.4.3)
|
|
27
29
|
attr_extras (7.1.0)
|
|
28
|
-
base64 (0.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
base64 (0.3.0)
|
|
31
|
+
benchmark (0.4.1)
|
|
32
|
+
bigdecimal (3.2.2)
|
|
33
|
+
concurrent-ruby (1.3.5)
|
|
34
|
+
connection_pool (2.5.3)
|
|
35
|
+
diff-lcs (1.6.2)
|
|
33
36
|
docile (1.4.0)
|
|
34
37
|
domain_name (0.6.20240107)
|
|
35
|
-
drb (2.2.
|
|
36
|
-
factory_bot (6.4
|
|
37
|
-
activesupport (>=
|
|
38
|
+
drb (2.2.3)
|
|
39
|
+
factory_bot (6.5.4)
|
|
40
|
+
activesupport (>= 6.1.0)
|
|
38
41
|
faker (3.3.1)
|
|
39
42
|
i18n (>= 1.8.11, < 2)
|
|
40
43
|
http-accept (1.7.0)
|
|
41
44
|
http-cookie (1.0.5)
|
|
42
45
|
domain_name (~> 0.5)
|
|
43
|
-
i18n (1.14.
|
|
46
|
+
i18n (1.14.7)
|
|
44
47
|
concurrent-ruby (~> 1.0)
|
|
45
|
-
json (2.
|
|
48
|
+
json (2.13.2)
|
|
46
49
|
jwt (2.8.1)
|
|
47
50
|
base64
|
|
48
|
-
language_server-protocol (3.17.0.
|
|
51
|
+
language_server-protocol (3.17.0.5)
|
|
52
|
+
lint_roller (1.1.0)
|
|
53
|
+
logger (1.7.0)
|
|
49
54
|
mime-types (3.5.2)
|
|
50
55
|
mime-types-data (~> 3.2015)
|
|
51
56
|
mime-types-data (3.2024.0305)
|
|
52
|
-
minitest (5.
|
|
53
|
-
mutex_m (0.2.0)
|
|
57
|
+
minitest (5.25.5)
|
|
54
58
|
netrc (0.11.0)
|
|
55
|
-
optimist (3.1
|
|
56
|
-
parallel (1.
|
|
57
|
-
parser (3.3.0
|
|
59
|
+
optimist (3.2.1)
|
|
60
|
+
parallel (1.27.0)
|
|
61
|
+
parser (3.3.9.0)
|
|
58
62
|
ast (~> 2.4.1)
|
|
59
63
|
racc
|
|
60
64
|
patience_diff (1.2.0)
|
|
61
65
|
optimist (~> 3.0)
|
|
66
|
+
prism (1.4.0)
|
|
62
67
|
public_suffix (5.0.5)
|
|
63
|
-
racc (1.
|
|
64
|
-
rack (3.
|
|
65
|
-
rack-test (2.
|
|
68
|
+
racc (1.8.1)
|
|
69
|
+
rack (3.1.16)
|
|
70
|
+
rack-test (2.2.0)
|
|
66
71
|
rack (>= 1.3)
|
|
67
72
|
rainbow (3.1.1)
|
|
68
|
-
regexp_parser (2.
|
|
73
|
+
regexp_parser (2.11.2)
|
|
69
74
|
rest-client (2.1.0)
|
|
70
75
|
http-accept (>= 1.7.0, < 2.0)
|
|
71
76
|
http-cookie (>= 1.0.2, < 2.0)
|
|
72
77
|
mime-types (>= 1.16, < 4.0)
|
|
73
78
|
netrc (~> 0.8)
|
|
74
79
|
retryable (3.0.5)
|
|
75
|
-
rexml (3.
|
|
80
|
+
rexml (3.4.1)
|
|
76
81
|
rotp (6.3.0)
|
|
77
|
-
rspec (3.13.
|
|
82
|
+
rspec (3.13.1)
|
|
78
83
|
rspec-core (~> 3.13.0)
|
|
79
84
|
rspec-expectations (~> 3.13.0)
|
|
80
85
|
rspec-mocks (~> 3.13.0)
|
|
81
|
-
rspec-core (3.13.
|
|
86
|
+
rspec-core (3.13.4)
|
|
82
87
|
rspec-support (~> 3.13.0)
|
|
83
|
-
rspec-expectations (3.13.
|
|
88
|
+
rspec-expectations (3.13.5)
|
|
84
89
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
85
90
|
rspec-support (~> 3.13.0)
|
|
86
|
-
rspec-mocks (3.13.
|
|
91
|
+
rspec-mocks (3.13.5)
|
|
87
92
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
88
93
|
rspec-support (~> 3.13.0)
|
|
89
|
-
rspec-support (3.13.
|
|
90
|
-
rubocop (1.
|
|
94
|
+
rspec-support (3.13.4)
|
|
95
|
+
rubocop (1.79.0)
|
|
91
96
|
json (~> 2.3)
|
|
92
|
-
language_server-protocol (
|
|
97
|
+
language_server-protocol (~> 3.17.0.2)
|
|
98
|
+
lint_roller (~> 1.1.0)
|
|
93
99
|
parallel (~> 1.10)
|
|
94
100
|
parser (>= 3.3.0.2)
|
|
95
101
|
rainbow (>= 2.2.2, < 4.0)
|
|
96
|
-
regexp_parser (>=
|
|
97
|
-
|
|
98
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
102
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
103
|
+
rubocop-ast (>= 1.46.0, < 2.0)
|
|
99
104
|
ruby-progressbar (~> 1.7)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
tsort (>= 0.2.0)
|
|
106
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
107
|
+
rubocop-ast (1.46.0)
|
|
108
|
+
parser (>= 3.3.7.2)
|
|
109
|
+
prism (~> 1.4)
|
|
110
|
+
rubocop-rails (2.32.0)
|
|
104
111
|
activesupport (>= 4.2.0)
|
|
112
|
+
lint_roller (~> 1.1)
|
|
105
113
|
rack (>= 1.1)
|
|
106
|
-
rubocop (>= 1.
|
|
107
|
-
rubocop-ast (>= 1.
|
|
114
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
115
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
|
108
116
|
ruby-progressbar (1.13.0)
|
|
109
|
-
rubyzip (2.
|
|
110
|
-
|
|
117
|
+
rubyzip (2.4.1)
|
|
118
|
+
securerandom (0.4.1)
|
|
119
|
+
selenium-webdriver (4.34.0)
|
|
111
120
|
base64 (~> 0.2)
|
|
121
|
+
logger (~> 1.4)
|
|
112
122
|
rexml (~> 3.2, >= 3.2.5)
|
|
113
123
|
rubyzip (>= 1.2.2, < 3.0)
|
|
114
124
|
websocket (~> 1.0)
|
|
@@ -118,32 +128,35 @@ GEM
|
|
|
118
128
|
simplecov_json_formatter (~> 0.1)
|
|
119
129
|
simplecov-html (0.12.3)
|
|
120
130
|
simplecov_json_formatter (0.1.4)
|
|
121
|
-
super_diff (0.
|
|
131
|
+
super_diff (0.16.0)
|
|
122
132
|
attr_extras (>= 6.2.4)
|
|
123
133
|
diff-lcs
|
|
124
134
|
patience_diff
|
|
135
|
+
tsort (0.2.0)
|
|
125
136
|
tzinfo (2.0.6)
|
|
126
137
|
concurrent-ruby (~> 1.0)
|
|
127
|
-
unicode-display_width (2.
|
|
128
|
-
websocket (1.2.
|
|
138
|
+
unicode-display_width (2.6.0)
|
|
139
|
+
websocket (1.2.11)
|
|
129
140
|
zache (0.13.1)
|
|
130
141
|
|
|
131
142
|
PLATFORMS
|
|
132
143
|
arm64-darwin-23
|
|
144
|
+
arm64-darwin-24
|
|
145
|
+
arm64-darwin-25
|
|
133
146
|
x86_64-linux
|
|
134
147
|
|
|
135
148
|
DEPENDENCIES
|
|
136
149
|
descope!
|
|
137
|
-
factory_bot (= 6.4
|
|
150
|
+
factory_bot (= 6.5.4)
|
|
138
151
|
faker
|
|
139
|
-
rack-test (= 2.
|
|
152
|
+
rack-test (= 2.2.0)
|
|
140
153
|
rotp (= 6.3.0)
|
|
141
|
-
rspec (= 3.13.
|
|
142
|
-
rubocop (= 1.
|
|
143
|
-
rubocop-rails (= 2.
|
|
144
|
-
selenium-webdriver (= 4.
|
|
154
|
+
rspec (= 3.13.1)
|
|
155
|
+
rubocop (= 1.79.0)
|
|
156
|
+
rubocop-rails (= 2.32.0)
|
|
157
|
+
selenium-webdriver (= 4.34.0)
|
|
145
158
|
simplecov (= 0.22.0)
|
|
146
|
-
super_diff (= 0.
|
|
159
|
+
super_diff (= 0.16.0)
|
|
147
160
|
|
|
148
161
|
BUNDLED WITH
|
|
149
162
|
2.5.6
|