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 2022/10/11 08:48:19 UTC

[GitHub] [apisix] wulinghui opened a new issue, #8073: help request: 自定义插件复制jwt-auth实现出现 Missing related consumer

wulinghui opened a new issue, #8073:
URL: https://github.com/apache/apisix/issues/8073

   ### Description
   
   我按钮文档去新增了一个lua插件并且配置使得该插件生效。
   但是在访问对应的路由时他报 `{"message":"Missing related consumer"}`
   
   我看源码代码是
   ```
       local consumer_conf = consumer_mod.plugin(plugin_name)
       if not consumer_conf then
           return 401, {message = "Missing related consumer"}
       end
   ```
   
   是不是consumer还需要再把目前的插件名给配置上去??
   
   ### Environment
   
   - APISIX version (run `apisix version`):
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

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


[GitHub] [apisix] wulinghui commented on issue #8073: help request: 自定义插件复制jwt-auth实现出现 Missing related consumer

Posted by GitBox <gi...@apache.org>.
wulinghui commented on issue #8073:
URL: https://github.com/apache/apisix/issues/8073#issuecomment-1274421707

   [jwt-pluns.zip](https://github.com/apache/apisix/files/9753745/jwt-pluns.zip)
   ok,谢谢回复。 请看压缩包里面。 
   我添加了一个插件(代码完全复制jwt-auth.lua)只是修改了name,并在config-default.yaml 配置文件中了启用的插件该插件。
   也的确生效了,但是输入了`?jwt=xxxxxxxxx`后就报 `{message = "Missing related consumer"}` 错误啦。


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] tokers commented on issue #8073: help request: 自定义插件复制jwt-auth实现出现 Missing related consumer

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8073:
URL: https://github.com/apache/apisix/issues/8073#issuecomment-1274343453

   The information you provided was totally useless. You should tell us which kinds of plugin are you trying to create. Also, if possible, paste some code snippets here.
   
   Looks like you're writing an auth plugin, an auth plugin should design a way to find an APISIX consumer via the current API request (e.g., via a header, an arg, or even from the request body).


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] tzssangglass closed issue #8073: help request: 自定义插件复制jwt-auth实现出现 Missing related consumer

Posted by GitBox <gi...@apache.org>.
tzssangglass closed issue #8073: help request: 自定义插件复制jwt-auth实现出现 Missing related consumer
URL: https://github.com/apache/apisix/issues/8073


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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