public abstract class AbstractAuthenticator extends Object implements RequestAuthenticator
Modifier and Type | Field and Description |
---|---|
protected long |
_lValidityTimePeriod |
protected static org.apache.log4j.Logger |
LOGGER |
Constructor and Description |
---|
AbstractAuthenticator() |
Modifier and Type | Method and Description |
---|---|
String |
buildSignature(List<String> listElements,
String strTimestamp,
String strSecret)
Create a signature
|
protected List<String> |
getSignatureElements()
Returns the list of signature elements
|
long |
getValidityTimePeriod()
Get validity time period (in seconds) between the timestamp in the request and the server timestamp
|
protected boolean |
isValidTimestamp(String strTimestamp)
This method checks the date of the request
|
void |
setHashService(HashService service)
Sets the Hash service
|
void |
setSignatureElements(List<String> list)
Sets the list of signature elements
|
void |
setValidityTimePeriod(long lPeriod)
Sets validity time period (in seconds) between the timestamp in the request and the server timestamp
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
authenticateRequest, isRequestAuthenticated
protected static final org.apache.log4j.Logger LOGGER
protected long _lValidityTimePeriod
public void setSignatureElements(List<String> list)
list
- The listprotected List<String> getSignatureElements()
public void setHashService(HashService service)
service
- The Hash servicepublic void setValidityTimePeriod(long lPeriod)
lPeriod
- The validity time periodpublic long getValidityTimePeriod()
public String buildSignature(List<String> listElements, String strTimestamp, String strSecret)
listElements
- The list of elements that part of the hashstrTimestamp
- The timestampstrSecret
- The secretprotected boolean isValidTimestamp(String strTimestamp)
strTimestamp
- The timestampCopyright © 2019 City of Paris. All rights reserved.