mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-05 03:37:26 +00:00
28 lines
1.5 KiB
Plaintext
28 lines
1.5 KiB
Plaintext
[[servlet-authentication-unpwd]]
|
|
= Username/Password Authentication
|
|
:figures: images/servlet/authentication/unpwd
|
|
:icondir: images/icons
|
|
|
|
One of the most common ways to authenticate a user is by validating a username and password.
|
|
As such, Spring Security provides comprehensive support for authenticating with a username and password.
|
|
|
|
[[servlet-authentication-unpwd-input]]
|
|
== Reading the Username & Password
|
|
|
|
Spring Security provides the following built in mechanisms for reading a username and password from the `HttpServletRequest`:
|
|
|
|
* xref:servlet/authentication/passwords/form.adoc#servlet-authentication-form[Form Login]
|
|
* xref:servlet/authentication/passwords/basic.adoc#servlet-authentication-basic[Basic Authentication]
|
|
* xref:servlet/authentication/passwords/digest.adoc#servlet-authentication-digest[Digest Authentication]
|
|
|
|
[[servlet-authentication-unpwd-storage]]
|
|
== Storage Mechanisms
|
|
|
|
Each of the supported mechanisms for reading a username and password can leverage any of the supported storage mechanisms:
|
|
|
|
* Simple Storage with xref:servlet/authentication/passwords/in-memory.adoc#servlet-authentication-inmemory[In-Memory Authentication]
|
|
* Relational Databases with xref:servlet/authentication/passwords/jdbc.adoc#servlet-authentication-jdbc[JDBC Authentication]
|
|
* Custom data stores with xref:servlet/authentication/passwords/user-details-service.adoc#servlet-authentication-userdetailsservice[UserDetailsService]
|
|
* LDAP storage with xref:servlet/authentication/passwords/ldap.adoc#servlet-authentication-ldap[LDAP Authentication]
|
|
|