You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/04 02:13:02 UTC
[GitHub] [apisix] tzssangglass commented on a change in pull request #2594: example: the use of the RS256 algorithm to run the jwt-auth plugin #2523
tzssangglass commented on a change in pull request #2594:
URL: https://github.com/apache/apisix/pull/2594#discussion_r517059711
##########
File path: apisix/plugins/jwt-auth.lua
##########
@@ -105,6 +106,12 @@ function _M.check_schema(conf, schema_type)
conf.secret = ngx_encode_base64(resty_random.bytes(32, true))
end
+ if conf.algorithm == "RS256" then
+ if not conf.public_key or not conf.private_key then
+ return false, "when using RS256 algorithm, the parameter 'public_key' and 'private_key' is both required."
Review comment:
I deleted the check code. If I want to express the dependency between parameters, how to do it by JSONSchema.
related https://github.com/api7/jsonschema/issues/2
----------------------------------------------------------------
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