-
Notifications
You must be signed in to change notification settings - Fork 0
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
AuthTokenHandler to always send an auth header unless specified otherwise #63
base: main
Are you sure you want to change the base?
Conversation
I unchecked |
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.
I unchecked
Contains NO breaking changes
because this PR currently reverses a default behavior which will break all applications usingAuthenticationTokenHandler
.
I wonder if we should keep the default behavior AND introduce a new class with the behavior that you want?
Note however that the breaking change is probably going to be silent... meaning that it will provide a header that wasn't provided previously, which shouldn't actually break functionalities.
In any case, it's still a breaking change because the behavior changes.
src/MallardMessageHandlers/AuthenticationToken/AuthenticationTokenHandler.cs
Show resolved
Hide resolved
As you mentioned, it's a breaking change that doesn't break anything. The behavior is subtly different, yes, but I believe this is more of a fix to an undesirable behavior rather than a completely different implementation. Apps don't even have to react to this change, or very slightly if they desire not to try to send an auth header when sending a login request (for example), by adding [Headers("Authorization: Anonymous")] instead of nothing. Let me know what you think. |
@jeanplevesque Should we close this? |
GitHub Issue: #62
Proposed Changes
What is the current behavior?
AuthenticationTokenHandler does not include a token if the request doesn't already contain an Auth header.
What is the new behavior?
AuthenticationTokenHandler always includes a token unless it finds Authorization: Anonymous in the headers.
Checklist