-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: Add Authenticator Checks unit tests #45
Conversation
@navidnabavi Sure, I will add them. |
Updates? |
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 have to handle "CerberusReasonUpstreamAuthFailed", "CerberusReasonUpstreamAuthTimeout" errors in next steps, and write test for them.
thanks to @ZeynabRezaei 🔥 |
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.
Welldone 👍🏼
@@ -187,7 +187,7 @@ func (a *Authenticator) Check(ctx context.Context, request *Request) (finalRespo | |||
reason, cerberusExtraHeaders = a.TestAccess(request, wsvcCacheEntry) | |||
|
|||
extraHeaders = toExtraHeaders(cerberusExtraHeaders) | |||
if reason == CerberusReasonOK && hasUpstreamAuth(wsvcCacheEntry) { | |||
if reason == "" && hasUpstreamAuth(wsvcCacheEntry) { |
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.
why not using constants?
No description provided.