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

Having JWT support for authentication #254

Closed
LoicPoullain opened this issue Oct 23, 2018 · 4 comments
Closed

Having JWT support for authentication #254

LoicPoullain opened this issue Oct 23, 2018 · 4 comments

Comments

@LoicPoullain
Copy link
Member

Is your feature request related to a problem? Please describe.

When developing SPA or mobile applications, the use of sessions and cookies for authentication may be difficult.

Describe the solution you'd like

FoalTS should offer a basic support to handle authentication with JWT.

The solution should:

  • have a simple hook @AuthenticateWithJWTHeader to decode the Authorization header and fill the context with the user,
  • offer refresh tokens,
  • offer token blacklisting.

The solution should not:

  • decide how the JWT is sent to the client (cookie, body, headers, etc).
@LoicPoullain LoicPoullain added this to Backlog in Issue tracking Oct 23, 2018
@LoicPoullain LoicPoullain moved this from Backlog to To Do in Issue tracking Oct 23, 2018
@LoicPoullain LoicPoullain moved this from To Do to Backlog in Issue tracking Oct 24, 2018
@LoicPoullain LoicPoullain moved this from Backlog to To Do in Issue tracking Oct 24, 2018
@LoicPoullain
Copy link
Member Author

If you already use JWT for authentication, feel free to share your code or suggest something in this conversation 😉

@wbhob
Copy link

wbhob commented Nov 21, 2018

I would suggest having a global provider also have an "interceptor" of sorts to send data through the decorator. That is to say, after parsing the content of the token, I could make a database call to get more properties of the user from an external function before returning control to the main method controller.

@LoicPoullain LoicPoullain moved this from To Do to December 2018 in Issue tracking Dec 4, 2018
@LoicPoullain
Copy link
Member Author

Thanks for the suggestion @wbhob , the feature is on its way.

This was referenced Dec 10, 2018
@LoicPoullain
Copy link
Member Author

Added in v0.7.0

Issue tracking automation moved this from December 2018 to Done Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Issue tracking
  
Done / Closed This Release
Development

No branches or pull requests

2 participants