/** * Initializes the authenticator with a key loader, auth header, and comparison timestamp. * * @param \Acquia\Hmac\KeyLoaderInterface $keyLoader * A datastore used to locate secrets for corresponding IDs. * @param \Acquia\Hmac\AuthorizationHeaderInterface $authHeader * An optional custom authorization header. * @param int $timestamp * An optional custom timestamp by which to compare requests. */ public function __construct(KeyLoaderInterface $keyLoader, AuthorizationHeaderInterface $authHeader = null, $timestamp = null) { parent::__construct($keyLoader); $this->authHeader = $authHeader; $this->timestamp = $timestamp ?: time(); }