Removed remaining deprecated elements

This commit is contained in:
Alejandro Celaya
2019-12-31 16:05:02 +01:00
parent 434b56fa8c
commit 5c90a7c7a7
25 changed files with 15 additions and 765 deletions

View File

@@ -8,8 +8,6 @@ use Fig\Http\Message\StatusCodeInterface;
use Zend\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
use Zend\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
use function sprintf;
class VerifyAuthenticationException extends RuntimeException implements ProblemDetailsExceptionInterface
{
use CommonProblemDetailsExceptionTrait;
@@ -25,46 +23,4 @@ class VerifyAuthenticationException extends RuntimeException implements ProblemD
return $e;
}
/** @deprecated */
public static function forInvalidAuthToken(): self
{
$e = new self(
'Missing or invalid auth token provided. Perform a new authentication request and send provided '
. 'token on every new request on the Authorization header'
);
$e->detail = $e->getMessage();
$e->title = 'Invalid auth token';
$e->type = 'INVALID_AUTH_TOKEN';
$e->status = StatusCodeInterface::STATUS_UNAUTHORIZED;
return $e;
}
/** @deprecated */
public static function forMissingAuthType(): self
{
$e = new self('You need to provide the Bearer type in the Authorization header.');
$e->detail = $e->getMessage();
$e->title = 'Invalid authorization';
$e->type = 'INVALID_AUTHORIZATION';
$e->status = StatusCodeInterface::STATUS_UNAUTHORIZED;
return $e;
}
/** @deprecated */
public static function forInvalidAuthType(string $providedType): self
{
$e = new self(sprintf('Provided authorization type %s is not supported. Use Bearer instead.', $providedType));
$e->detail = $e->getMessage();
$e->title = 'Invalid authorization';
$e->type = 'INVALID_AUTHORIZATION';
$e->status = StatusCodeInterface::STATUS_UNAUTHORIZED;
return $e;
}
}