Class WebAuthenticationDetails

java.lang.Object
org.springframework.security.web.authentication.WebAuthenticationDetails
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails

public class WebAuthenticationDetails extends Object implements Serializable
A holder of selected HTTP details related to a web authentication request.
See Also:
  • Constructor Details

    • WebAuthenticationDetails

      public WebAuthenticationDetails(jakarta.servlet.http.HttpServletRequest request)
      Records the remote address and will also set the session Id if a session already exists (it won't create one).
      Parameters:
      request - that the authentication request was received from
    • WebAuthenticationDetails

      public WebAuthenticationDetails(String remoteAddress, String sessionId)
      Constructor to add Jackson2 serialize/deserialize support
      Parameters:
      remoteAddress - remote address of current request
      sessionId - session id
      Since:
      5.7
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getRemoteAddress

      public String getRemoteAddress()
      Indicates the TCP/IP address the authentication request was received from.
      Returns:
      the address
    • getSessionId

      public String getSessionId()
      Indicates the HttpSession id the authentication request was received from.
      Returns:
      the session ID
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object