| 1 | <?php |
||
| 8 | final class AuthorizationHeaderExtractor implements TokenExtractorInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * A custom scheme expected in the Authorization header. |
||
| 12 | * |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $scheme; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Construct a new instance of this extractor |
||
| 19 | * |
||
| 20 | * @param string $scheme A custom scheme expected in the Authorization header. |
||
| 21 | */ |
||
| 22 | public function __construct(string $scheme = 'hmac') |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Extracts the HMAC authentication Token from the given PSR-7 $request. |
||
| 29 | * |
||
| 30 | * @param ServerRequestInterface $request The request containing the HMAC token data. |
||
| 31 | * |
||
| 32 | * @return Token |
||
| 33 | * |
||
| 34 | * @throws AuthenticationException 400 Thrown if any required data is missing. |
||
| 35 | */ |
||
| 36 | public function extract(ServerRequestInterface $request) : Token |
||
| 52 | } |
||
| 53 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.