CSA-AI / CSA_AI_Backend

The backend spring portfolio for the CSA_AI project
1 stars 0 forks source link

Added JWT complete working #3

Closed anawandh closed 8 months ago

anawandh commented 8 months ago

General idea:

Image

Details:

Image

First Test Result:

JWT token generation

The following image shows the generation of a JWT token when a "human" authenticates himself which is shown in the body. In one of the screenshots below I show the code that displays the jwt not only in the headers but also body. Image image

Roles and Authorities

As seen in one of the images below only those who are teachers can "delete". The "toby" guy is a "teacher" and hence can delete. image image

Unlike Jmort who does not have the same authority and hence gets the 403 forbidden error

Image Image

Security the makes it work -

image