-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add authentication database migrations * Add token-generation script * Rename permission table to role_ability * Make token id a string * Add jwt-util * Split jwt decoding and getPayload functions * Decouple test from jsonwebtoken lib * Update doc * Add test for expired jwt validation * Implement isAuthenticated method * Implement isAuthorized method * Implement abilities fetching * Implement isActionPublic method * rename isPublicAction method to isActionPublic * Implement auth middlewares * Update config structure * Fix isRevoked promise bug * Fix token-generation script * Integrate auth middlewares * Fix repository to accept tokenId param * Remove unused middleware * Move middlewares to separate folder * Fix method logic to fit method name * Add tests for middlewares * Update config.json * Use publicOperation instead of publicAction * Merge _isRevoked method inside of _isTokenValid method * Fix typo * Fix model association bug * Add logging for auth-service * Fix bug when token is valid but not recorded in the database * Update config.json with loggingEnabled field * Enable pre-commit git hook
- Loading branch information
Showing
32 changed files
with
2,107 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
#npm run lint-staged | ||
npm run lint-staged |
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.