Skip to content

Commit c8183d0

Browse files
authored
Update README.md
Updated instructions to set Authorization headers working
1 parent d1175da commit c8183d0

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,21 @@ add_filter( 'graphql_jwt_auth_secret_key', function() {
3333
});
3434
```
3535

36-
If you are using Apache to run Wordpress you should add this to your .htaccess in order to enable Authorization header in your project
36+
This secret is used in the encoding and decoding of the JWT token. If the Secret were ever changed on the server, ALL tokens that were generated with the previous Secret would become invalid. So, if you wanted to invalidate all user tokens, you can change the Secret on the server and _all_ previously issued tokens would become invalid and require users to re-authenticate.
37+
38+
- Learn more about JWT: https://jwt.io/introduction/
39+
40+
## HTTP_AUTHORIZATION
41+
42+
In order to use this plugin, your WordPress environment must support the HTTP_AUTHORIZATION header. In some cases, this header is not passed to WordPress because of some server configurations.
43+
44+
Depending on your particular environment, you may have to research how to enable these headers, but in Apache, you can do the following in your `.htaccess`:
3745

3846
```
3947
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
4048
```
4149

42-
This secret is used in the encoding and decoding of the JWT token. If the Secret were ever changed on the server, ALL tokens that were generated with the previous Secret would become invalid. So, if you wanted to invalidate all user tokens, you can change the Secret on the server and _all_ previously issued tokens would become invalid and require users to re-authenticate.
43-
44-
- Learn more about JWT: https://jwt.io/introduction/
50+
For NGINX, this may work: https://serverfault.com/questions/511206/nginx-forward-http-auth-user#answer-511612
4551

4652
## How the plugin Works
4753

0 commit comments

Comments
 (0)