for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Equip\Auth\Exception;
use Exception;
/**
* Exception that occurs when a user specifies an authentication token that is
* invalid.
*/
class InvalidException extends AuthException
{
const CODE = 403;
* @param string $token
* @param Exception $previous
public static function tokenExpired($token, Exception $previous = null)
throw new static(
sprintf('Token expired: %s', $token),
static::CODE,
$previous
);
}
public static function tokenUnparseable($token, Exception $previous = null)
sprintf('Could not parse token: %s', $token),
public static function invalidSignature($token, Exception $previous = null)
sprintf('Token signature is not valid: %s', $token),
public static function invalidToken($token, Exception $previous = null)
sprintf('Token is expired or otherwise invalid: %s', $token),