2019-12-06 10:39:55 -06:00
|
|
|
[[servlet-authentication-unpwd]]
|
|
|
|
= Username/Password Authentication
|
2020-02-28 16:39:41 -06:00
|
|
|
:figures: images/servlet/authentication/unpwd
|
|
|
|
:icondir: images/icons
|
2019-12-06 10:39:55 -06:00
|
|
|
|
|
|
|
One of the most common ways to authenticate a user is by validating a username and password.
|
2020-02-28 11:33:31 -06:00
|
|
|
As such, Spring Security provides comprehensive support for authenticating with a username and password.
|
2019-12-06 10:39:55 -06:00
|
|
|
|
2020-02-28 11:33:31 -06:00
|
|
|
[[servlet-authentication-unpwd-input]]
|
2021-07-26 15:48:55 -05:00
|
|
|
== Reading the Username & Password
|
2020-03-02 11:56:56 -06:00
|
|
|
|
2020-02-28 11:33:31 -06:00
|
|
|
Spring Security provides the following built in mechanisms for reading a username and password from the `HttpServletRequest`:
|
2019-12-06 10:39:55 -06:00
|
|
|
|
2020-02-28 11:33:31 -06:00
|
|
|
* <<servlet-authentication-form,Form Login>>
|
|
|
|
* <<servlet-authentication-basic,Basic Authentication>>
|
|
|
|
* <<servlet-authentication-digest,Digest Authentication>>
|
|
|
|
|
|
|
|
[[servlet-authentication-unpwd-storage]]
|
2021-07-26 15:48:55 -05:00
|
|
|
== Storage Mechanisms
|
2020-03-02 11:56:56 -06:00
|
|
|
|
2020-02-28 11:33:31 -06:00
|
|
|
Each of the supported mechanisms for reading a username and password can leverage any of the supported storage mechanisms:
|
|
|
|
|
|
|
|
* Simple Storage with <<servlet-authentication-inmemory>>
|
|
|
|
* Relational Databases with <<servlet-authentication-jdbc>>
|
|
|
|
* Custom data stores with <<servlet-authentication-userdetailsservice>>
|
2020-03-02 11:56:56 -06:00
|
|
|
* LDAP storage with <<servlet-authentication-ldap>>
|
2020-02-28 11:33:31 -06:00
|
|
|
|