Reading-Notes

My journal for Code Fellows


Project maintained by RogerMReyes Hosted on GitHub Pages — Theme by mattgraham

Read 16

Summary

Spring Auth

The main strategy interface for authentication when it comes to SpringMVC is AuthenticationManager. This interface will return one of three options in its authenticate() method which are Authentication, AuthenticationException, and null. The first return true that the input is valid, second being invalid and third being undecided.

Quick and Dirty Spring Auth Setup

  1. Set up a user model and repo that connects it to the database.

  2. Create a controller that will be handling the model

  3. Have a method in the repo that will make pulling a username from the database easier

  4. Set up a registration route that will store the user and password into the database while hashing to the password when its stored.

  5. Set up a login page that will use the findByUsername method made in the repo

Things I want to know more About

I would like to know more about limiting access through the ProviderManager and Authentication Managers.

Return to Code 401 Table of Contents