JWT settings not working #2947
-
Broken JWT settings in *.ini file. DescriptionI'm trying to config couch to accept different hmac-keys depended on their names but it not work as described in documentation. Only Steps to ReproduceAdd following config options to ini-file:
Try to perform request to server with key with
Request will be rejected. Expected BehaviourAccepted request. Your EnvironmentOfficial Docker image
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
it's working with me, i use docker image for this. you can try:
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.
my jwt token:
hope help you! |
Beta Was this translation helpful? Give feedback.
-
Not exactly the same situation. I talked about the To reproduce my case, you can rename |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Heh, you're right. I tried to put the Fine! It works well now! Sorry to waste your time and thanks for the help! |
Beta Was this translation helpful? Give feedback.
in your case, you can use multi scret key and alg (hmac or rsa):
hmac: foo= aGVsbG8=
hmac:bar= aGVsbG8y
and in jwt token, you need set kid attribute"kid":"foo" or "kid":"bar" on header token for using hmac secret key for the corresponding .
example:
token header: