Join Kevin Skoglund for an in-depth discussion in this video Authenticating, part of Ruby on Rails 3 Essential Training.
- View Offline
- Exercise Files
Now that we can save usernames and hashed passwords for database, it's time to…set up our authentication methods.…We want to be able to take a username and a password and find out if that…matches a user in the database.…The way I am thinking that it will do something like this, authorized_user =, and we'll ask the class…AdminUser, hey can you authenticate this username and password?…It will either return a user to us if it does match someone, or it will return…false if it doesn't.…Then we will be able to just check in our controller, does authorized user have a value or not?…If it's false, then we didn't get anyone.…
If we did that we have that user returned to us that we can work with and…continue to do things with.…So, I want you to try this on your own.…You should already have enough skills to do this and I think it will be useful exercise.…Here are couples of pointers.…First, you want a query for the matching username.…Then if it's found, you'll encrypt and compare the hashed passwords.…If the passwords match, return the user object.…
- Understanding MVC (Model View Controller ) architecture
- Routing browser requests through the framework
- Responding to requests with dynamic content
- Defining associations and database relationships
- Creating, reading, updating and deleting records
- Working with forms
- Validating form data
- Reviewing built-in security features
- Authenticating users and managing user access
- Debugging and error handling
Skill Level Beginner
1. What Is Ruby on Rails?
2. Installing Ruby on Rails on a Mac
3. Installing Ruby on Rails on a Windows Machine
4. Getting Started
5. Controllers, Views, and Dynamic Content
6. Databases and Migrations
7. Models, ActiveRecord, and ActiveRelation
9. Controllers and CRUD
10. Layouts, Partials, and View Helpers
12. Data Validation
13. User Authentication
14. Improving the Simple CMS
15. Debugging and Error Handling
16. Introducing More Advanced Topics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.