-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update middleware to throw when token is invalid when credentials are…
…n't required
- Loading branch information
1 parent
15da043
commit fd58e89
Showing
2 changed files
with
27 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fd58e89
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.
@johnnyhalife
What is the reason behind this change?
This causes some issues for us since we have multiple layers of middleware, some with different secrets.
With this change the first middleware that encounters an authorization header with a different secret fails. Previously it worked fine since credentialsRequired is set to false on those middleware layers.
fd58e89
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.
The changes come from this PR, after having a conversation with @JfromA (#127) please read the thread.
fd58e89
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.
Shouldn't the readme be update on this topic?