Welcome! Log In Create A New Profile

Advanced

Multiples JWT in the same request

Geovana Possenti
January 01, 2021 03:54PM
Hello,

I have a request that sends two different tokens (JWT) generated with the
same key (JWK).

Could nginx validate both tokens? Each of them is passed in a different
Header. I tried to duplicate the auth_jwt configuration but it is not
possible to duplicate this parameterization in the same location.

It works:
location /myapp {
proxy_pass http://xxxx;
auth_jwt "Client Token" token=$http_authclient;
auth_jwt_key_file conf.d/key.jwt;
}

It doesn't work:
location /myapp {
proxy_pass http://xxxx;
auth_jwt "Client Token" token=$http_authclient;
auth_jwt "User Token" token=$http_authuser;
auth_jwt_key_file conf.d/key.jwt;
}

Request Example passing two Tokens:
curl -H "Authclient: XXXXXXX" -H "Authuser: YYYYYYYY"
http://localhost:8080/myapp

Regards
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Multiples JWT in the same request

Geovana Possenti January 01, 2021 03:54PM

Re: Multiples JWT in the same request

Maxim Konovalov January 04, 2021 03:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 55
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready