PHP Class LoginMiddleware, BicBucStriim

Inheritance: extends Slim\Middleware
Mostrar archivo Open project: rvolz/BicBucStriim

Protected Properties

Property Type Description
$realm
$static_resource_paths

Public Methods

Method Description
__construct ( $realm, $statics ) Initialize the PDO connection and merge user config with defaults.
authBeforeDispatch ( )
call ( )

Protected Methods

Method Description
checkHttpAuth ( $request ) : array Look for a HTTP Authorization header and decode it
checkPhpAuth ( $request ) : array Look for PHP authorization headers
getForwardingInfo ( Slim\Http\Headers $headers ) : null | UrlInfo Return a UrlInfo instance if the request contains forwarding information, or null if not.
is_authorized ( ) : true Check if the access request is authorized by a user. A request must either contain session data from a previous login or contain a HTTP Basic authorization info, which is then used to perform a login against the users table in the database.
is_static_resource ( $resource ) Static resources must not be protected. Return true id the requested resource belongs to a static resource path, else false.
mkRootUrl ( )

Method Details

__construct() public method

Initialize the PDO connection and merge user config with defaults.
public __construct ( $realm, $statics )

authBeforeDispatch() public method

public authBeforeDispatch ( )

call() public method

public call ( )

checkHttpAuth() protected method

Look for a HTTP Authorization header and decode it
protected checkHttpAuth ( $request ) : array
$request HTTP request
return array with username and pasword, or null

checkPhpAuth() protected method

Look for PHP authorization headers
protected checkPhpAuth ( $request ) : array
$request HTTP request
return array with username and pasword, or null

getForwardingInfo() protected method

First we look for the standard 'Forwarded' header from RFC 7239, then for the non-standard X-Forwarded-... headers.
protected getForwardingInfo ( Slim\Http\Headers $headers ) : null | UrlInfo
$headers Slim\Http\Headers
return null | UrlInfo

is_authorized() protected method

Check if the access request is authorized by a user. A request must either contain session data from a previous login or contain a HTTP Basic authorization info, which is then used to perform a login against the users table in the database.
protected is_authorized ( ) : true
return true if authorized else false

is_static_resource() protected method

Static resources must not be protected. Return true id the requested resource belongs to a static resource path, else false.
protected is_static_resource ( $resource )

mkRootUrl() protected method

protected mkRootUrl ( )

Property Details

$realm protected_oe property

protected $realm

$static_resource_paths protected_oe property

protected $static_resource_paths