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)
return new static(
sprintf('Provided auth token `%s` is expired', $token),
static::CODE,
$previous
);
}
public static function tokenUnparseable($token, Exception $previous = null)
sprintf('Provided auth token `%s` could not be parsed', $token),
public static function invalidSignature($token, Exception $previous = null)
sprintf('Signature of provided auth token `%s` is not valid', $token),
public static function invalidToken($token, Exception $previous = null)
sprintf('Provided auth token `%s` is expired or otherwise invalid', $token),