Kong JWT plugin

#1

Can any one please tell me whether i am right or wrong, because i am facing issue while creating JWT plugin in Kong

step 1 creating a tocken using the below command
curl -X POST http://kong-Host:8001/consumers/{consumer-ID}/jwt -H “Content-Type: application/x-www-form-urlencoded”

Step 2 configured a jwt plugin with below info
claims_to_verify :- exp,nbf
secret_is_base64 :- true
run-on_preflight :- true
key_claim_names:- XIpMoucYgWBZif44gS3PPC4E5qNNiFgy (secret key which was created in first step)

but when i am trying to access the api secured by jwt plugin. i am facing the issue

Error:- {“message”:“Bad token; invalid JSON”}

please let me know what to do configure jwt plugin

Thanks
prashant

0 Likes