Web Programming for Apps and Services

Schedule Notes Resources MyApps Instructions Graded Work Code examples

WEB422 Week 11 Notes

This week, we will discuss how we can handle the security of a Web API and by extension, in an Angular application. This will involve adding routes to a Node/Express server for logging in and registering users, connecting to a MongoDB database and hashing passwords. We will also look at how we can modify the server to generate a special type of secure token, ie: a JSON Web Token (JWT) that contains a signed payload that can be sent to the client once they’ve been authenticated. Client apps can use this token as an identifier to be sent with all requests to prove the identity of a logged in user.

Next, once we have secured a Web API, we will discuss how we can work with the new features in an Angular application. This will involve automatically storing and retrieving the JWT, as well as protecting routes within the application from unauthorized access.

For more information:

Remember to frequently use the learning resources.