PHP Class Imbo\EventListener\Authenticate

This listener enforces the usage of the signature and timestamp parameters when the user agent wants to perform write operations (PUT/POST/DELETE).
Author: Christer Edvartsen ([email protected])
Inheritance: implements Imbo\EventListener\ListenerInterface
Show file Open project: imbo/imbo Class Usage Examples

Public Methods

Method Description
authenticate ( Imbo\EventManager\EventInterface $event )
getSubscribedEvents ( )

Private Methods

Method Description
signatureIsValid ( string $httpMethod, string $url, string $publicKey, array $privateKey, string $timestamp, string $signature ) : boolean Check if the signature is valid
timestampHasExpired ( string $timestamp ) : boolean Check if the timestamp has expired
timestampIsValid ( string $timestamp ) : boolean Check if the format of the timestamp is valid

Method Details

authenticate() public method

public authenticate ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface

getSubscribedEvents() public static method

public static getSubscribedEvents ( )