Spring Authentication

(Cheat Sheet by Michelle Ferreirae)

Ahuthentication

public interface AuthenticationManager {

  Authentication authenticate(Authentication authentication)
    throws AuthenticationException;
}

and an implemented ProviderManager and a series of AuthenticationProvider instances:

public interface AuthenticationProvider {

	Authentication authenticate(Authentication authentication)
		throws AuthenticationException;

	boolean supports(Class<?> authentication);
}

ProviderManagers can have children which in turn have their own respective AuthenticationProviders.

Authorization

Servlet Filters

Request Matching

Method Access

@Service
public class MyService {

  @Secured("ROLE_USER")
  public String secure() {
    return "Hello Security";
  }

}