Imbo\EventListener\Authenticate::timestampIsValid PHP Method

timestampIsValid() private method

Check if the format of the timestamp is valid
private timestampIsValid ( string $timestamp ) : boolean
$timestamp string A string with a timestamp
return boolean
    private function timestampIsValid($timestamp)
    {
        if (!preg_match('/^[\\d]{4}-[\\d]{2}-[\\d]{2}T[\\d]{2}:[\\d]{2}:[\\d]{2}(?:\\.\\d+)?Z$/', $timestamp)) {
            return false;
        }
        return true;
    }