Lab Assignment 8 - Sbhavyarao/ASE_Lab8 GitHub Wiki
Objective:
The main objective of this application is to perform JWT authentication.
Pre requisites:
- WebStorm IDE
- Node
- Expressjs
- Angular
- JWT
Implementation:
- Created login and home components.
- Configured routing modules in app.routing.modules.ts.
- User interface code was written in for login and home pages.
- Created login and get details methods in login and home components ts files.
- Created backend folder, added code to connect to port 3000.And also added JWT authentication methods.
- Saved token details in local storage. Retrieved token details while performing get user details operations.
Sample Output:
- By default, Login page will be shown.
-
After login page when user clicks on login button he/she will be redirected to the home page.
-
On click of get user details user can see the payload details of JWT token.
-
Stored token details in local storage.
Conclusion:
- We analyzed the given source code for this assignment. Installed Json web token. Performed JWT authentication while logging in. We got an idea about JWT authentication.