-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
headerDecoder could use "time now" to ignore expired headers
- Loading branch information
choonkeat
committed
Sep 17, 2021
1 parent
ebdf5fb
commit 97fc97b
Showing
4 changed files
with
19 additions
and
8 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
97fc97b
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.
Background
headerDecoder
is how applications can parse raw HTTP headers into a domain specific custom types that's easier to work with, e.g.Previously the
headerDecoder
type signature wasWhich allowed
headerDecoder
to use the information in the server state to determine how to decode the HTTP headers. e.g. we could use theserverState.signingSecret
to verify that the signature of the JWT inAuthorization
header.Problem
But
headerDecoder
would not have enough information to decide if the JWT is still valid or had expired.Solution
Thus in this release, we changed to include the current time as first argument to
headerDecoder
Migration
Developers who continue to have no need for the current time in their
headerDecoder
, can update simply update the type signature and ignore the new parameter