You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* First stab at RSA validation.
* Fix for build errors
* Another build fix
* Fix for key copy
* Key length fix
* Logging
* Logging fix
* Remove debug logs.
Make validation of email optional with auth_jwt_validate_email
* Fix for email validation option, now auth_jwt_email_validation
* Changed back to auth_jwt_validate_email and additional conf merging code
* One more email validation fix
* More fixes to email validate
* Another fix
* Set getJwt logs to NGX_LOG_DEBUG
* Updated README.
Rearranged some code.
* Added else error condition to avert compiler warning.
So, a typical use would be to specify the key and loginurl on the main level and then only turn on the locations that you want to secure (not the login page). Unauthorized requests are given 302 "Moved Temporarily" responses with a ___location of the specified loginurl.
By default the authorization header is used to provide a JWT for validation. However, you may use the `auth_jwt_validation_type` configuration to specify the name of a cookie that provides the JWT.
30
32
33
+
34
+
35
+
The default algorithm is 'HS256', for symmetric key validation. Also supported is 'RS256', for RSA 256-bit public key validation.
36
+
37
+
If using "auth_jwt_algorithm RS256;", then the 'auth_jwt_key' field must be set to your public key. That is the public key, rather than a PEM certificate. I.e.:
By default, the module will attempt to validate the email address field of the JWT, then set the x-email header of the session, and will log an error if it isn't found. To disable this behavior, for instance if you are using a different user identifier property such as 'sub', set:
54
+
55
+
```
56
+
auth_jwt_validate_email off;
57
+
```
58
+
59
+
60
+
31
61
The Dockerfile builds all of the dependencies as well as the module, downloads a binary version of nginx, and runs the module as a dynamic module.
32
62
33
63
Have a look at build.sh, which creates the docker image and container and executes some test requests to illustrate that some pages are secured by the module and requre a valid JWT.
0 commit comments