Package net.solarnetwork.web.security
Class AuthenticationDataFactory
java.lang.Object
net.solarnetwork.web.security.AuthenticationDataFactory
Factory for creating
AuthenticationData instances.- Since:
- 1.11
- Version:
- 1.1
- Author:
- matt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe system property name of an "explicit" HTTP Host header value to use for authentication signature calculation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationDataObtain aAuthenticationDatainstance from a HTTP request.
-
Field Details
-
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 aAuthenticationDatainstance from a HTTP request.- Parameters:
request- The HTTP request.- Returns:
- the authentication data, or null if no
Authorizationheader provided on the request or the authorization scheme is not supported - Throws:
IOException- if any IO error occursorg.springframework.security.authentication.BadCredentialsException- if the authorization data is malformed in any way
-