auth0 5.6.0 → 5.8.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/.circleci/config.yml +2 -1
- data/.gitignore +0 -1
- data/.shiprc +7 -0
- data/CHANGELOG.md +92 -31
- data/Gemfile.lock +233 -0
- data/README.md +1 -1
- data/lib/auth0/api/authentication_endpoints.rb +1 -1
- data/lib/auth0/api/v2/attack_protection.rb +79 -0
- data/lib/auth0/api/v2/device_credentials.rb +8 -3
- data/lib/auth0/api/v2/grants.rb +2 -2
- data/lib/auth0/api/v2/organizations.rb +1 -1
- data/lib/auth0/api/v2.rb +2 -0
- data/lib/auth0/mixins/validation.rb +4 -4
- data/lib/auth0/version.rb +1 -1
- data/spec/lib/auth0/api/v2/actions_spec.rb +13 -13
- data/spec/lib/auth0/api/v2/attack_protection_spec.rb +132 -0
- data/spec/lib/auth0/api/v2/blacklists_spec.rb +2 -2
- data/spec/lib/auth0/api/v2/branding_spec.rb +4 -3
- data/spec/lib/auth0/api/v2/client_grants_spec.rb +8 -8
- data/spec/lib/auth0/api/v2/clients_spec.rb +12 -12
- data/spec/lib/auth0/api/v2/connections_spec.rb +10 -10
- data/spec/lib/auth0/api/v2/device_credentials_spec.rb +39 -10
- data/spec/lib/auth0/api/v2/emails_spec.rb +2 -2
- data/spec/lib/auth0/api/v2/grants_spec.rb +11 -11
- data/spec/lib/auth0/api/v2/jobs_spec.rb +18 -17
- data/spec/lib/auth0/api/v2/log_streams_spec.rb +3 -3
- data/spec/lib/auth0/api/v2/logs_spec.rb +2 -2
- data/spec/lib/auth0/api/v2/organizations_spec.rb +13 -13
- data/spec/lib/auth0/api/v2/resource_servers_spec.rb +5 -5
- data/spec/lib/auth0/api/v2/roles_spec.rb +22 -22
- data/spec/lib/auth0/api/v2/rules_spec.rb +7 -7
- data/spec/lib/auth0/api/v2/stats_spec.rb +1 -1
- data/spec/lib/auth0/api/v2/tenants_spec.rb +1 -1
- data/spec/lib/auth0/api/v2/tickets_spec.rb +14 -14
- data/spec/lib/auth0/api/v2/user_blocks_spec.rb +2 -2
- data/spec/lib/auth0/api/v2/users_by_email_spec.rb +2 -2
- data/spec/lib/auth0/api/v2/users_spec.rb +23 -23
- data/spec/lib/auth0/mixins/validation_spec.rb +16 -2
- metadata +8 -3
@@ -6,6 +6,7 @@ RSA_PUB_KEY_JWK_2 = { 'kty': "RSA", 'use': 'sig', 'n': "uGbXWiK3dQTyCbX5xdE4yCuY
|
|
6
6
|
JWKS_RESPONSE_1 = { 'keys': [RSA_PUB_KEY_JWK_1] }.freeze
|
7
7
|
JWKS_RESPONSE_2 = { 'keys': [RSA_PUB_KEY_JWK_2] }.freeze
|
8
8
|
JWKS_URL = 'https://tokens-test.auth0.com/.well-known/jwks.json'.freeze
|
9
|
+
JWKS_URL_2 = 'https://tokens-test2.auth0.com/.well-known/jwks.json'.freeze
|
9
10
|
HMAC_SHARED_SECRET = 'secret'.freeze
|
10
11
|
|
11
12
|
LEEWAY = 60
|
@@ -459,6 +460,19 @@ describe Auth0::Algorithm::RS256 do
|
|
459
460
|
expect(a_request(:get, JWKS_URL)).to have_been_made.once
|
460
461
|
end
|
461
462
|
|
463
|
+
it 'is expected to fetch the jwks from multiple urls' do
|
464
|
+
stub_jwks(JWKS_RESPONSE_2, JWKS_URL_2)
|
465
|
+
|
466
|
+
instance1 = Auth0::Algorithm::RS256.jwks_url(JWKS_URL)
|
467
|
+
instance2 = Auth0::Algorithm::RS256.jwks_url(JWKS_URL_2)
|
468
|
+
instance1.jwks
|
469
|
+
instance2.jwks
|
470
|
+
instance1.jwks
|
471
|
+
|
472
|
+
expect(a_request(:get, JWKS_URL)).to have_been_made.once
|
473
|
+
expect(a_request(:get, JWKS_URL_2)).to have_been_made.once
|
474
|
+
end
|
475
|
+
|
462
476
|
it 'is expected to forcibly fetch the jwks from the url' do
|
463
477
|
instance = Auth0::Algorithm::RS256.jwks_url(JWKS_URL)
|
464
478
|
instance.jwks
|
@@ -493,6 +507,6 @@ describe Auth0::Algorithm::RS256 do
|
|
493
507
|
end
|
494
508
|
# rubocop:enable Metrics/BlockLength
|
495
509
|
|
496
|
-
def stub_jwks(stub = JWKS_RESPONSE_1)
|
497
|
-
stub_request(:get,
|
510
|
+
def stub_jwks(stub = JWKS_RESPONSE_1, url = JWKS_URL)
|
511
|
+
stub_request(:get, url).to_return(body: stub.to_json)
|
498
512
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auth0
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Auth0
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2022-03-29 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rest-client
|
@@ -286,11 +286,13 @@ files:
|
|
286
286
|
- ".rspec"
|
287
287
|
- ".rubocop.yml"
|
288
288
|
- ".rubocop_todo.yml"
|
289
|
+
- ".shiprc"
|
289
290
|
- CHANGELOG.md
|
290
291
|
- CODE_OF_CONDUCT.md
|
291
292
|
- DEPLOYMENT.md
|
292
293
|
- Dockerfile
|
293
294
|
- Gemfile
|
295
|
+
- Gemfile.lock
|
294
296
|
- Guardfile
|
295
297
|
- LICENSE
|
296
298
|
- README.md
|
@@ -371,6 +373,7 @@ files:
|
|
371
373
|
- lib/auth0/api/v2.rb
|
372
374
|
- lib/auth0/api/v2/actions.rb
|
373
375
|
- lib/auth0/api/v2/anomaly.rb
|
376
|
+
- lib/auth0/api/v2/attack_protection.rb
|
374
377
|
- lib/auth0/api/v2/blacklists.rb
|
375
378
|
- lib/auth0/api/v2/branding.rb
|
376
379
|
- lib/auth0/api/v2/client_grants.rb
|
@@ -587,6 +590,7 @@ files:
|
|
587
590
|
- spec/integration/lib/auth0/auth0_client_spec.rb
|
588
591
|
- spec/lib/auth0/api/v2/actions_spec.rb
|
589
592
|
- spec/lib/auth0/api/v2/anomaly_spec.rb
|
593
|
+
- spec/lib/auth0/api/v2/attack_protection_spec.rb
|
590
594
|
- spec/lib/auth0/api/v2/blacklists_spec.rb
|
591
595
|
- spec/lib/auth0/api/v2/branding_spec.rb
|
592
596
|
- spec/lib/auth0/api/v2/client_grants_spec.rb
|
@@ -642,7 +646,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
642
646
|
- !ruby/object:Gem::Version
|
643
647
|
version: '0'
|
644
648
|
requirements: []
|
645
|
-
rubygems_version: 3.
|
649
|
+
rubygems_version: 3.2.22
|
646
650
|
signing_key:
|
647
651
|
specification_version: 4
|
648
652
|
summary: Auth0 API Client
|
@@ -826,6 +830,7 @@ test_files:
|
|
826
830
|
- spec/integration/lib/auth0/auth0_client_spec.rb
|
827
831
|
- spec/lib/auth0/api/v2/actions_spec.rb
|
828
832
|
- spec/lib/auth0/api/v2/anomaly_spec.rb
|
833
|
+
- spec/lib/auth0/api/v2/attack_protection_spec.rb
|
829
834
|
- spec/lib/auth0/api/v2/blacklists_spec.rb
|
830
835
|
- spec/lib/auth0/api/v2/branding_spec.rb
|
831
836
|
- spec/lib/auth0/api/v2/client_grants_spec.rb
|