-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support multiple secrets (backwards compatible)
* feat: allow returning multiple secrets in getSecret * fix: picking a secret in generateTokenAndHash * feat: add validateOnGeneration option to generateToken * fix: typing in CsrfTokenCreator * test: some basic tests for new functionality - wip * test: revert tests to what they were before, but test both passing a single and multiple secrets * test: add additional tests for secret rotation scenarios * test: wip - improve tests for token rotation * test: refactor tests to be tidier, and add test cases * test: add validateOnGeneration tests * refactor: move overwrite/validateOnGeneration defaults to generateToken * test: change some wording * fix: accept validateOnGeneration param in req.csrfToken * docs: update README with latest information and fix minor details * chore(dev): rename validateOnGeneration > validateOnReuse Some comment and readme adjustments * chore(dev): add CHANGELOG.md to .prettierignore --------- Co-authored-by: David González Martínez <[email protected]>
- Loading branch information
1 parent
fe5170a
commit 51da818
Showing
7 changed files
with
422 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules | ||
.* | ||
lib/ | ||
package-lock.json | ||
package-lock.json | ||
CHANGELOG.md |
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
Oops, something went wrong.