Authentication mechanisms provide a way for the user to provide their credentials so that they can be authenticated against an identity store.
The Java EE 8 Security API provides support for basic HTTP authentication, a standard authentication mechanism supported by most web browsers, as well as form authentication, where users provide their credentials via an HTML form. Form authentication, by default, submits a form to a security servlet provided by the Java EE implementation. If we need more flexibility or to better align with other Java EE technologies, the security API provides custom form authentication as well, which allows us, as application developers, to have more control over how to authenticate users attempting to access our application.