Class AuthenticationDataFactory

java.lang.Object
net.solarnetwork.web.security.AuthenticationDataFactory

public final class AuthenticationDataFactory extends Object
Factory for creating AuthenticationData instances.
Since:
1.11
Version:
1.1
Author:
matt
  • Field Details

    • EXPLICIT_HOST_PROP

      public static final String EXPLICIT_HOST_PROP
      The system property name of an "explicit" HTTP Host header value to use for authentication signature calculation.

      This can be useful when the application performing the authentication validation sits behind a proxy or load balancer and the requested Host value is different than the value used to generate the authenciation signature.

      Since:
      1.1
      See Also:
  • Constructor Details

    • AuthenticationDataFactory

      public AuthenticationDataFactory()
  • Method Details

    • authenticationDataForAuthorizationHeader

      public static AuthenticationData authenticationDataForAuthorizationHeader(SecurityHttpServletRequestWrapper request) throws IOException
      Obtain a AuthenticationData instance from a HTTP request.
      Parameters:
      request - The HTTP request.
      Returns:
      the authentication data, or null if no Authorization header provided on the request or the authorization scheme is not supported
      Throws:
      IOException - if any IO error occurs
      org.springframework.security.authentication.BadCredentialsException - if the authorization data is malformed in any way