Package fr.paris.lutece.util.signrequest
Class ClientHeaderHashAuthenticator
java.lang.Object
fr.paris.lutece.util.signrequest.AbstractAuthenticator
fr.paris.lutece.util.signrequest.ClientHeaderHashAuthenticator
- All Implemented Interfaces:
RequestAuthenticator
public class ClientHeaderHashAuthenticator
extends AbstractAuthenticator
implements RequestAuthenticator
Client Header Hash Authenticator
-
Constructor Summary
Constructors -
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 requestvoidsetClientId(String strClientId) Set the client ID This setter should be used in the Spring context file of the CLIENT to declare the client ID.voidsetClientKeyService(ClientKeyService clientKeyService) Set the clientKeyService This setter should be used in the Spring context file of the SERVER to provide a lookup service to find keys for given client ids.Methods inherited from class fr.paris.lutece.util.signrequest.AbstractAuthenticator
buildSignature, getValidityTimePeriod, setHashService, setSignatureElements, setValidityTimePeriod
-
Constructor Details
-
ClientHeaderHashAuthenticator
public ClientHeaderHashAuthenticator()
-
-
Method Details
-
setClientId
Set the client ID This setter should be used in the Spring context file of the CLIENT to declare the client ID.- Parameters:
strClientId- The client ID
-
setClientKeyService
Set the clientKeyService This setter should be used in the Spring context file of the SERVER to provide a lookup service to find keys for given client ids.- Parameters:
clientKeyService- The client key service
-
isRequestAuthenticated
public boolean isRequestAuthenticated(jakarta.servlet.http.HttpServletRequest request) Check the Authentication of a request- Specified by:
isRequestAuthenticatedin interfaceRequestAuthenticator- Parameters:
request- The HTTP request- Returns:
- true if authenticated, otherwise false
-
getSecurityInformations
return Security informations to put in the request headers and request parameters- Specified by:
getSecurityInformationsin interfaceRequestAuthenticator- Parameters:
elements- List of elements to include in the signature- Returns:
- AuthenticateRequestInformations
-