blob: 9e8163d39830cbb93613e38d168602b312b0db49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
namespace Digitigrade\HttpResponseStatus;
use Digitigrade\HttpResponseStatus;
class Unauthorized extends \Exception implements HttpResponseStatus {
public function __construct(?string $reason = null) {
$this->message = $reason ?? 'This request requires authorization';
}
public function httpCode(): int {
return 401;
}
public function httpReason(): string {
return "Unauthorized";
}
public function httpHeaders() {
}
}
|