I am new to Web-Development and am currently using Laravel 4
Question
Should I be using Cookies or Sessions for my user authentication? I will need the site to:
- Display currently logged in user
Behave differently on some pages depending on the user
I am thinking of just adding another cookie and then using that cookie for every request that way I could retrieve the user's identity and use it for both displaying the name and behaving accordingly depending on the route.
Can I do this? And the just "mask it" (with some encryption) and then just "decode it" in my views?
Background:
- I am working with Confide/Entrust
- I am building a SPA
- Data driven website/Many users
- Working with Backbone JS
I have installed an authentication package and am now able to log people in. I can limit people's movement to specific areas of the site by testing to see if they are a guest but that is the extent of my understanding.