Documentation

DemandAuthHeader
in package
implements MiddlewareInterface

DemandAuthHeader middleware

Purpose: Send appropriate response if no auth header present

Check if an Authorization header of any kind is present

If the header is missing, send a 401 Auth Required response Include a WWW-Authenticate header with a realm and method

Table of Contents

Interfaces

MiddlewareInterface

Properties

$challenge  : string
$responseFactory  : ResponseFactoryInterface

Methods

__construct()  : mixed
process()  : ResponseInterface

Properties

Methods

__construct()

public __construct(ResponseFactoryInterface $responseFactory[, string $type = 'BASIC' ][, string $realm = '' ][, string $charset = 'UTF-8' ]) : mixed
Parameters
$responseFactory : ResponseFactoryInterface
$type : string = 'BASIC'
$realm : string = ''
$charset : string = 'UTF-8'

process()

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
$request : ServerRequestInterface
$handler : RequestHandlerInterface
Return values
ResponseInterface

        
On this page

Search results