Package fr.paris.lutece.util.signrequest
Class AbstractAuthenticator
- java.lang.Object
-
- fr.paris.lutece.util.signrequest.AbstractAuthenticator
-
- All Implemented Interfaces:
RequestAuthenticator
- Direct Known Subclasses:
AbstractJWTAuthenticator,AbstractPrivateKeyAuthenticator,BasicAuthorizationAuthenticator,ClientHeaderHashAuthenticator
public abstract class AbstractAuthenticator extends java.lang.Object implements RequestAuthenticator
AbstractAuthenticator
-
-
Constructor Summary
Constructors Constructor Description AbstractAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringbuildSignature(java.util.List<java.lang.String> listElements, java.lang.String strTimestamp, java.lang.String strSecret)Create a signaturelonggetValidityTimePeriod()Get validity time period (in seconds) between the timestamp in the request and the server timestampvoidsetHashService(HashService service)Sets the Hash servicevoidsetSignatureElements(java.util.List<java.lang.String> list)Sets the list of signature elementsvoidsetValidityTimePeriod(long lPeriod)Sets validity time period (in seconds) between the timestamp in the request and the server timestamp-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface fr.paris.lutece.util.signrequest.RequestAuthenticator
getSecurityInformations, isRequestAuthenticated
-
-
-
-
Method Detail
-
setSignatureElements
public void setSignatureElements(java.util.List<java.lang.String> list)
Sets the list of signature elements- Parameters:
list- The list
-
setHashService
public void setHashService(HashService service)
Sets the Hash service- Parameters:
service- The Hash service
-
setValidityTimePeriod
public void setValidityTimePeriod(long lPeriod)
Sets validity time period (in seconds) between the timestamp in the request and the server timestamp- Parameters:
lPeriod- The validity time period
-
getValidityTimePeriod
public long getValidityTimePeriod()
Get validity time period (in seconds) between the timestamp in the request and the server timestamp- Returns:
- the validity time period
-
buildSignature
public java.lang.String buildSignature(java.util.List<java.lang.String> listElements, java.lang.String strTimestamp, java.lang.String strSecret)Create a signature- Parameters:
listElements- The list of elements that part of the hashstrTimestamp- The timestampstrSecret- The secret- Returns:
- A signature as an Hexadecimal Hash
-
-