Skip to content
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

allow nil values for consumer and credential #153

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

lvermeire
Copy link
Contributor

#152

kong.client.authenticate should accept nil values for consumer and credential.

@CLAassistant
Copy link

CLAassistant commented Jul 18, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Loïc Vermeire seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@fffonion
Copy link
Contributor

@lvermeire Thank you. Could you sign the CLA with the email that authors the commit please?

@lvermeire
Copy link
Contributor Author

@lvermeire Thank you. Could you sign the CLA with the email that authors the commit please?

I believe I did? Originally signed the commit with the wrong email, but updated it right after with a force push.

Copy link
Member

@gszr gszr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gszr
Copy link
Member

gszr commented Feb 22, 2024

@lvermeire could you look into adding the test case? Thank you for your contribution!

@lvermeire lvermeire requested a review from gszr February 22, 2024 09:35
@lvermeire
Copy link
Contributor Author

@lvermeire could you look into adding the test case? Thank you for your contribution!

Added two test cases.

Copy link
Member

@gszr gszr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lvermeire Thank you for your contribution! 🙏🏻

if consumer == nil {
return fmt.Errorf("Invalid consumer")
if consumer == nil && credential == nil {
return fmt.Errorf("either credential or consumer must be provided")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice that you preserved the kong error message here : )

@gszr gszr force-pushed the kong-client-authenticate branch 2 times, most recently from 77521b5 to 81330ef Compare February 22, 2024 12:39
lvermeire and others added 2 commits February 22, 2024 09:40
Either `consumer` or `credential` may be nil.

Fixes Kong#152
…g#172)"

This reverts commit 088679a.

This commit broke tests in community PRs.
@gszr gszr force-pushed the kong-client-authenticate branch from 81330ef to ad21e33 Compare February 22, 2024 12:40
@gszr gszr merged commit 91fcd23 into Kong:master Feb 22, 2024
2 checks passed
@gszr
Copy link
Member

gszr commented Feb 22, 2024

@lvermeire - With this fix you are eligible for a "Kong contributor badge" since this is part of Kong Gateway; please fill out the form at https://docs.google.com/forms/d/e/1FAIpQLSfacQHac-PYIDIrDOi_W2l7cWxBDRIVBs6xE5HnlojPvdhL9g/viewform if you'd like to claim it! 🦍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants