Week9 - shenzm/cs5610 GitHub Wiki
On the 9th week, I focus on learning how to provide authentication function and support access control on different content, following are the experiments
- Passport - Simple Authentication
- Passport - Protect Server APIs
- Passport/AngularJS - Access control on app views
- Passport - Integrate authentication with MongoDB
- Passport - Logout function
Passport - Simple Authentication
This experiment focus on using passport module to authenticate user through a SignIn page. Since passport package authentication mechanisms, known as strategies, as individual modules, we only use local strategy to authenticate users.
Passport - Protect Server APIs
This experiment focus on protect a certain server side API by using the passport module. Basically when the server side API is called, it intercepts and check if the user is already authenticate before actually return the data.
Passport/AngularJS - Access control on app views
This experiment focus on protecting a certain view on the client application. Application page such as user profile should not be able to be accessed if user is not logged in.
Passport - Integrate authentication with MongoDB
This experiment is based on the last few experiments, it focus on provide a simple login function on the web application that integrated with the back end user data persistence.
Passport - Logout function
This experiment is based on the last few experiments, it provide a navigation link that can logout from the web application.
Summary :
In this week's experiments, I succeed in using Passport module to give authentication functionality over application. Also I add access control on different views, as well as a series of functions, such as SignIn, SignOut. I still didn't implement Register/SignUp function, and I will finished it in next weeks experiments.