Zendro-dev / graphql-server

Skeleton NodeJS project for a graphQL server.
GNU General Public License v3.0
0 stars 1 forks source link

Encode not only the user but also his/her roles in the JWT #19

Open asishallab opened 4 years ago

asishallab commented 4 years ago

Upon login-success encode both the user as well as the user's roles objects in the JWT. Thus the single-page-application is able to obtain the user's roles from the token and implement its own authorization checks.

Update the existing tests to take into account this new feature.

Expected work time: 4h