for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Equip\Auth\Exception;
/**
* Exception that occurs when a user specifies an authentication token that is
* invalid.
*/
class InvalidException extends AuthException
{
public function __construct(
$message = 'The token being used is invalid',
\Exception $previous = null
) {
parent::__construct($message, 403, $previous);
}
public static function tokenExpired($token, \Exception $previous = null)
throw new static(
sprintf('Token expired: %s', $token),
$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),