Skip to content
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

nil check in refreshHandler + refreshHandler code refactoring #165

Merged
merged 9 commits into from
Sep 13, 2018

Conversation

kingcw
Copy link
Contributor

@kingcw kingcw commented Sep 10, 2018

  1. added a nil check in refreshHandler to prevent panic when token is nil, this is when there is no JWT in cookie

  2. refactored code to new RefreshToken func, for ppl who like to refresh everytime in Authorization or every request

  3. refactored code to new CheckIfTokenExpire func, for ppl who like to only check if token is expired in Authorization, mainly for SPA use, one way to refresh is to only refresh on application load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants