AbstractAuth
in package
HTTP Authentication base class.
This class provides some common functionality for the various base classes.
Tags
Table of Contents
- $realm : string
- Authentication realm.
- $request : RequestInterface
- Request object.
- $response : ResponseInterface
- Response object.
- __construct() : mixed
- Creates the object.
- getRealm() : string
- Returns the HTTP realm.
- requireLogin() : mixed
- This method sends the needed HTTP header and statuscode (401) to force the user to login.
Properties
$realm
Authentication realm.
protected
string
$realm
$request
Request object.
protected
RequestInterface
$request
$response
Response object.
protected
ResponseInterface
$response
Methods
__construct()
Creates the object.
public
__construct([string $realm = 'SabreTooth' ], RequestInterface $request, ResponseInterface $response) : mixed
Parameters
- $realm : string = 'SabreTooth'
- $request : RequestInterface
- $response : ResponseInterface
Return values
mixed —getRealm()
Returns the HTTP realm.
public
getRealm() : string
Return values
string —requireLogin()
This method sends the needed HTTP header and statuscode (401) to force the user to login.
public
abstract requireLogin() : mixed