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
|
|
|
|
2021-07-30 16:56:54 -05:00
|
|
|
* xref:servlet/authentication/unpwd/form.adoc#servlet-authentication-form[Form Login]
|
|
|
|
* xref:servlet/authentication/unpwd/basic.adoc#servlet-authentication-basic[Basic Authentication]
|
|
|
|
* xref:servlet/authentication/unpwd/digest.adoc#servlet-authentication-digest[Digest Authentication]
|
2020-02-28 11:33:31 -06:00
|
|
|
|
|
|
|
[[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:
|
|
|
|
|
2021-07-30 16:56:54 -05:00
|
|
|
* Simple Storage with xref:servlet/authentication/unpwd/in-memory.adoc#servlet-authentication-inmemory[]
|
|
|
|
* Relational Databases with xref:servlet/authentication/unpwd/jdbc.adoc#servlet-authentication-jdbc[]
|
|
|
|
* Custom data stores with xref:servlet/authentication/unpwd/user-details-service.adoc#servlet-authentication-userdetailsservice[]
|
|
|
|
* LDAP storage with xref:servlet/authentication/unpwd/ldap.adoc#servlet-authentication-ldap[]
|
2020-02-28 11:33:31 -06:00
|
|
|
|