-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev/key auth customize error msg #6040
Dev/key auth customize error msg #6040
Conversation
Hello there, the title and description need to be updated to make the PR more reviewer friendly. |
Sorry about it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use a common solution to solve this problem, instead of adding similar fields to each plugin. For example, the disable in the plugin conf:
Line 137 in 18c316f
if properties.disable then |
This has been discussed before.
But I don't think the common error return code and message was conflicted with the plugin's customize return error code. plugin doesn't return only one error message, maybe return kinds of error messages. for example: key-auth should customize three kinds of error message :
so i think there is no conflict between common error msg and plugin's customized error msg |
If you want to customize each error msg to a different value, my suggestion is to fork and modify this plugin by yourself. It's inconvenient to maintain such an API interface. We may introduce refactor in the future and change the number of "return xxx". How many |
@leslie-tsang @spacewander how about we walk in two steps |
by the way, I think authentication into two types:
so i think key-auth is actually a completely underestimated plugin. |
Personally, I think it’s not good to customize the rejection code. @nimohunter, if you are very interested in this feature, I think we can discuss it on the Apache mailing list. |
I agree with you, error code may not be customized. But how about the reject error msg? Error msg can be more friendly |
we can discuss it in Apache mail list, follow the Apache Way. https://lists.apache.org/[email protected] This seems to be a meaningful change. |
OK, i have send a mail about this MR... |
we can discuss the idea in mail list. If we can reach a consensus, we can do things according to the consensus. |
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the [email protected] list. Thank you for your contributions. |
This pull request/issue has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time. |
What this PR does / why we need it:
Add customized rejected error code and message for key-auth plugin.
Pre-submission checklist:
#6025