Package fr.paris.lutece.util.signrequest
Class BasicAuthorizationAuthenticator
java.lang.Object
fr.paris.lutece.util.signrequest.AbstractAuthenticator
fr.paris.lutece.util.signrequest.BasicAuthorizationAuthenticator
- All Implemented Interfaces:
RequestAuthenticator
BasicAuthorizationAuthenticator.
This authenticator provides a basic username/password authentication.
The request should have a header named Authorization with a value that begins with "Basic" followed by the "username:password" encoded in base64.
This authenticator provides a basic username/password authentication.
The request should have a header named Authorization with a value that begins with "Basic" followed by the "username:password" encoded in base64.
-
Constructor Summary
ConstructorsConstructorDescriptionBasicAuthorizationAuthenticator(String strUsername, String strPassword) Constructor that define credentials -
Method Summary
Modifier and TypeMethodDescriptiongetSecurityInformations(List<String> elements) return Security informations to put in the request headers and request parametersbooleanisRequestAuthenticated(jakarta.servlet.http.HttpServletRequest request) Check the Authentication of a requestMethods inherited from class fr.paris.lutece.util.signrequest.AbstractAuthenticator
buildSignature, getValidityTimePeriod, setHashService, setSignatureElements, setValidityTimePeriod
-
Constructor Details
-
BasicAuthorizationAuthenticator
Constructor that define credentials- Parameters:
strUsername- The usernamestrPassword- The password
-
-
Method Details
-
isRequestAuthenticated
public boolean isRequestAuthenticated(jakarta.servlet.http.HttpServletRequest request) Check the Authentication of a request- Parameters:
request- The HTTP request- Returns:
- true if authenticated, otherwise false
-
getSecurityInformations
return Security informations to put in the request headers and request parameters- Parameters:
elements- List of elements to include in the signature- Returns:
- AuthenticateRequestInformations
-