\Pivot\Core\Middleware\HttpPreAuthentication

Service Aware PreAuthentication

Summary

Methods
Properties
Constants
parseBearerToken()
__construct()
__invoke()
hasAuthenticationHeader()
No public properties found
No constants found
getServiceLocator()
No protected properties found
N/A
No private methods found
$serviceLocator
N/A

Properties

$serviceLocator

$serviceLocator : \Pivot\Core\Middleware\Pivot\Core\Services\ServliceLocator

Service locator

Type

\Pivot\Core\Middleware\Pivot\Core\Services\ServliceLocator

Methods

parseBearerToken()

parseBearerToken(  $token) 

Parameters

$token

__construct()

__construct(object  $serviceLocator) 

inject the service locator

Parameters

object $serviceLocator

__invoke()

__invoke(\Psr\Http\Message\ServerRequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response, callable  $next) : \Psr\Http\Message\ResponseInterface

Checks that there is an authentication header for non-white listed routes (login would be whitelisted.)

Parameters

\Psr\Http\Message\ServerRequestInterface $request

PSR7 request

\Psr\Http\Message\ResponseInterface $response

PSR7 response

callable $next

Next middleware

Returns

\Psr\Http\Message\ResponseInterface

hasAuthenticationHeader()

hasAuthenticationHeader(  $request) 

Parameters

$request

getServiceLocator()

getServiceLocator() : \Pivot\Core\Middleware\ServiceLocator

gets the service locator

Returns

\Pivot\Core\Middleware\ServiceLocator