Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Commit 1cf8606

Browse files
update cookie name in README and test
1 parent 8f39e48 commit 1cf8606

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ If you prefer to return 401 Unauthorized, you may turn `auth_jwt_redirect` off.
8383

8484
```
8585
auth_jwt_validation_type AUTHORIZATION;
86-
auth_jwt_validation_type COOKIE=rampartjwt;
86+
auth_jwt_validation_type COOKIE=jwt;
8787
```
8888
By default the authorization header is used to provide a JWT for validation.
8989
However, you may use the `auth_jwt_validation_type` configuration to specify the name of a cookie that provides the JWT.

resources/test-jwt-nginx.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ server {
1616

1717
___location ~ ^/secure/ {
1818
auth_jwt_enabled on;
19-
auth_jwt_validation_type COOKIE=rampartjwt;
19+
auth_jwt_validation_type COOKIE=jwt;
2020
root /usr/share/nginx;
2121
index index.html index.htm;
2222
}
@@ -29,7 +29,7 @@ server {
2929

3030
___location ~ ^/secure-rs256/ {
3131
auth_jwt_enabled on;
32-
auth_jwt_validation_type COOKIE=rampartjwt;
32+
auth_jwt_validation_type COOKIE=jwt;
3333
auth_jwt_algorithm RS256;
3434
auth_jwt_key "-----BEGIN PUBLIC KEY-----
3535
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwtpMAM4l1H995oqlqdMh

test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ main() {
3131

3232
test_jwt "Secure test without jwt cookie" "/secure/" "302"
3333

34-
test_jwt "Secure test with jwt cookie" "/secure/" "200" "--cookie \"rampartjwt=${VALIDJWT}\""
34+
test_jwt "Secure test with jwt cookie" "/secure/" "200" "--cookie \"jwt=${VALIDJWT}\""
3535

3636
test_jwt "Secure test with jwt auth header" "/secure-auth-header/" "200" "--header \"Authorization: Bearer ${VALIDJWT}\""
3737

@@ -41,11 +41,11 @@ main() {
4141

4242
test_jwt "Secure test without jwt auth header" "/secure-no-redirect/" "401"
4343

44-
test_jwt "Secure test with jwt cookie - with no sub" "/secure/" "200" " --cookie \"rampartjwt=${MISSING_SUB_JWT}\""
44+
test_jwt "Secure test with jwt cookie - with no sub" "/secure/" "200" " --cookie \"jwt=${MISSING_SUB_JWT}\""
4545

46-
test_jwt "Secure test with jwt cookie - with no email" "/secure/" "200" " --cookie \"rampartjwt=${MISSING_EMAIL_JWT}\""
46+
test_jwt "Secure test with jwt cookie - with no email" "/secure/" "200" " --cookie \"jwt=${MISSING_EMAIL_JWT}\""
4747

48-
test_jwt "Secure test with rs256 jwt cookie" "/secure-rs256/" "200" " --cookie \"rampartjwt=${VALID_RS256_JWT}\""
48+
test_jwt "Secure test with rs256 jwt cookie" "/secure-rs256/" "200" " --cookie \"jwt=${VALID_RS256_JWT}\""
4949

5050
test_jwt "Secure test rsa256 from file with valid jwt" "/secure-rs256-file/" "200" "--header \"Authorization: Bearer ${VALID_RS256_JWT}\""
5151

0 commit comments

Comments
 (0)