2
0

authentication-entry-point.adoc 977 B

1234567891011121314
  1. [[servlet-authentication-authenticationentrypoint]]
  2. = Request Credentials with `AuthenticationEntryPoint`
  3. {security-api-url}org/springframework/security/web/AuthenticationEntryPoint.html[`AuthenticationEntryPoint`] is used to send an HTTP response that requests credentials from a client.
  4. Sometimes a client will proactively include credentials such as a username/password to request a resource.
  5. In these cases, Spring Security does not need to provide an HTTP response that requests credentials from the client since they are already included.
  6. In other cases, a client will make an unauthenticated request to a resource that they are not authorized to access.
  7. In this case, an implementation of `AuthenticationEntryPoint` is used to request credentials from the client.
  8. The `AuthenticationEntryPoint` implementation might perform a <<servlet-authentication-form,redirect to a log in page>>, respond with an <<servlet-authentication-basic,WWW-Authenticate>> header, etc.