Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add encrypted token support #18

Merged
merged 4 commits into from
Feb 5, 2024
Merged

Add encrypted token support #18

merged 4 commits into from
Feb 5, 2024

Conversation

ArmaanMcleod
Copy link
Owner

Fixes #8.

Included -Encryption parameter for JWE algorithm & encryption support.

Copy link

github-actions bot commented Feb 4, 2024

Unit Test Results (Linux)

61 tests  +34   61 ✅ +34   3s ⏱️ +2s
11 suites + 5    0 💤 ± 0 
 1 files   ± 0    0 ❌ ± 0 

Results for commit dd8f155. ± Comparison against base commit a5b0c15.

This pull request removes 20 and adds 54 tests. Note that renamed tests count towards both.
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES256 algorithm and certificate with headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES256 algorithm and certificate with no headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES384 algorithm and certificate with headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES384 algorithm and certificate with no headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES512 algorithm and certificate with headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES512 algorithm and certificate with no headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS256 algorithm and secret key with headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS256 algorithm and secret key with no headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS384 algorithm and secret key with headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS384 algorithm and secret key with no headers
…
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES_A128KW' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES_A192KW' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES_A256KW' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if JWE algorithm is not using -Encryption parameter
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if JWS algorithm is using -Encryption parameter
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if incompatible algorithm DIR with encryption A128CBC_HS256 is used with -Certificate
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if incompatible algorithm RSA_OAEP_256 with encryption A128CBC_HS256 is used with -SecretKey
JsonWebToken Tests.JWT Encryption.A128GCMKW & A192GCMKW & A256GCMKW.Should return expected JWT token using A128GCMKW algorithm and 'A128CBC_HS256 A192CBC_HS384 A256CBC_HS512 A128GCM A192GCM A256GCM' encryptions and secret key with headers
JsonWebToken Tests.JWT Encryption.A128GCMKW & A192GCMKW & A256GCMKW.Should return expected JWT token using A128GCMKW algorithm and 'A128CBC_HS256 A192CBC_HS384 A256CBC_HS512 A128GCM A192GCM A256GCM' encryptions and secret key with no headers
…

Copy link

github-actions bot commented Feb 4, 2024

Unit Test Results (MacOS)

61 tests  +34   61 ✅ +34   8s ⏱️ +6s
11 suites + 5    0 💤 ± 0 
 1 files   ± 0    0 ❌ ± 0 

Results for commit dd8f155. ± Comparison against base commit a5b0c15.

This pull request removes 20 and adds 54 tests. Note that renamed tests count towards both.
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES256 algorithm and certificate with headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES256 algorithm and certificate with no headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES384 algorithm and certificate with headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES384 algorithm and certificate with no headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES512 algorithm and certificate with headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES512 algorithm and certificate with no headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS256 algorithm and secret key with headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS256 algorithm and secret key with no headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS384 algorithm and secret key with headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS384 algorithm and secret key with no headers
…
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES_A128KW' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES_A192KW' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES_A256KW' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if JWE algorithm is not using -Encryption parameter
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if JWS algorithm is using -Encryption parameter
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if incompatible algorithm DIR with encryption A128CBC_HS256 is used with -Certificate
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if incompatible algorithm RSA_OAEP_256 with encryption A128CBC_HS256 is used with -SecretKey
JsonWebToken Tests.JWT Encryption.A128GCMKW & A192GCMKW & A256GCMKW.Should return expected JWT token using A128GCMKW algorithm and 'A128CBC_HS256 A192CBC_HS384 A256CBC_HS512 A128GCM A192GCM A256GCM' encryptions and secret key with headers
JsonWebToken Tests.JWT Encryption.A128GCMKW & A192GCMKW & A256GCMKW.Should return expected JWT token using A128GCMKW algorithm and 'A128CBC_HS256 A192CBC_HS384 A256CBC_HS512 A128GCM A192GCM A256GCM' encryptions and secret key with no headers
…

Copy link

github-actions bot commented Feb 4, 2024

Unit Test Results (Windows)

61 tests  +34   61 ✅ +34   2s ⏱️ -1s
11 suites + 5    0 💤 ± 0 
 1 files   ± 0    0 ❌ ± 0 

Results for commit dd8f155. ± Comparison against base commit a5b0c15.

This pull request removes 20 and adds 54 tests. Note that renamed tests count towards both.
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES256 algorithm and certificate with headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES256 algorithm and certificate with no headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES384 algorithm and certificate with headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES384 algorithm and certificate with no headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES512 algorithm and certificate with headers
JsonWebToken Tests.ES Family Algorithms.Should return a valid JWT token using ES512 algorithm and certificate with no headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS256 algorithm and secret key with headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS256 algorithm and secret key with no headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS384 algorithm and secret key with headers
JsonWebToken Tests.HS Family Algorithms.Should return expected JWT token using HS384 algorithm and secret key with no headers
…
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES_A128KW' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES_A192KW' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if 'ECDH_ES_A256KW' algorithm is used
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if JWE algorithm is not using -Encryption parameter
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if JWS algorithm is using -Encryption parameter
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if incompatible algorithm DIR with encryption A128CBC_HS256 is used with -Certificate
JsonWebToken Tests.Invalid Parameter Combinations.Should throw an exception if incompatible algorithm RSA_OAEP_256 with encryption A128CBC_HS256 is used with -SecretKey
JsonWebToken Tests.JWT Encryption.A128GCMKW & A192GCMKW & A256GCMKW.Should return expected JWT token using A128GCMKW algorithm and 'A128CBC_HS256 A192CBC_HS384 A256CBC_HS512 A128GCM A192GCM A256GCM' encryptions and secret key with headers
JsonWebToken Tests.JWT Encryption.A128GCMKW & A192GCMKW & A256GCMKW.Should return expected JWT token using A128GCMKW algorithm and 'A128CBC_HS256 A192CBC_HS384 A256CBC_HS512 A128GCM A192GCM A256GCM' encryptions and secret key with no headers
…

@ArmaanMcleod ArmaanMcleod merged commit 54454b7 into main Feb 5, 2024
7 checks passed
@ArmaanMcleod ArmaanMcleod deleted the encrypted-token-support branch February 5, 2024 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for creating encrypted tokens
1 participant