Adding consumer credentials for JWT plugin in declarative config file

#1

Hi

I am trying to add jwt credentials for a customer in the declarative config file but am not finding the correct field name

For KeyAuth the credentials key is keyauth_credentials, what is it for the JWT plugin?

Best
Frans

0 Likes

#2

Frans

The entity name in this case is jwt_secrets so a consumer can be assigned jwt secrets with some yaml like

consumers:
- username: frodo
  # Custom entities from plugin can also be specified
  # If they specify a foreign-key relationshp, they can also be nested
  jwt_secrets:
  - key: frodo-key
  - secret: O3UJ6Wqa12hZ5LOhxE7YnlyS1YCxp42F

With the config parameters optional as in the doc https://docs.konghq.com/hub/kong-inc/jwt/#create-a-jwt-credential.

Hope this helps.

Regards,
Rob

0 Likes

#3

It does, much appreciated.

0 Likes