You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/06/18 20:08:38 UTC

[GitHub] [couchdb] PhamMinhNgoc commented on issue #2947: JWT settings not working

PhamMinhNgoc commented on issue #2947:
URL: https://github.com/apache/couchdb/issues/2947#issuecomment-646280200


   it's working with me, i use docker image for this. you can try:
   1. i config jwt secret key in file default.ini
   ![image](https://user-images.githubusercontent.com/12809264/85066060-727bf500-b1d8-11ea-8134-fd1a93d77377.png)
   
   2. config authentication handler in file path: /opt/couchdb/default.d/*.ini
   
   > authentication_handlers = {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, jwt_authentication_handler}
   
   you can use more than one secret key, if only one, "kid" attribute will indicate the key you use to validate that jwt code is valid or you can use the default key.
   
   > hmac: _default = aGVsbG8=
   The sub attribute indicates who you are authenticating.
   
   3. restart couchdb and try again.
   **Result:** 
   ![image](https://user-images.githubusercontent.com/12809264/85066929-05695f00-b1da-11ea-9a32-36c7df655aab.png)
   
   my jwt token: 
   
   > eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzEiLCJleHAiOjE1OTI2MTEyMDB9.Y9jNgSeSBl54V2MHg1hXhivyZsdXTeiAVJR2DSlF6LQ
   
   hope help you!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org