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
public class BasicAuthorizationAuthenticator extends AbstractAuthenticator
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.
-
-
Constructor Summary
Constructors Constructor Description BasicAuthorizationAuthenticator(java.lang.String strUsername, java.lang.String strPassword)Constructor that define credentials
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticateRequestInformationsgetSecurityInformations(java.util.List<java.lang.String> elements)return Security informations to put in the request headers and request parametersbooleanisRequestAuthenticated(javax.servlet.http.HttpServletRequest request)Check the Authentication of a request-
Methods inherited from class fr.paris.lutece.util.signrequest.AbstractAuthenticator
buildSignature, getValidityTimePeriod, setHashService, setSignatureElements, setValidityTimePeriod
-
-
-
-
Method Detail
-
isRequestAuthenticated
public boolean isRequestAuthenticated(javax.servlet.http.HttpServletRequest request)
Check the Authentication of a request- Parameters:
request- The HTTP request- Returns:
- true if authenticated, otherwise false
-
getSecurityInformations
public AuthenticateRequestInformations getSecurityInformations(java.util.List<java.lang.String> elements)
return Security informations to put in the request headers and request parameters- Parameters:
elements- List of elements to include in the signature- Returns:
- AuthenticateRequestInformations
-
-