PHP Class LoginMiddleware, BicBucStriim

Inheritance: extends Slim\Middleware
Afficher le fichier Open project: rvolz/BicBucStriim

Protected Properties

Свойство Type Description
$realm
$static_resource_paths

Méthodes publiques

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

Méthodes protégées

Méthode 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 méthode

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

authBeforeDispatch() public méthode

public authBeforeDispatch ( )

call() public méthode

public call ( )

checkHttpAuth() protected méthode

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

checkPhpAuth() protected méthode

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

getForwardingInfo() protected méthode

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
Résultat null | UrlInfo

is_authorized() protected méthode

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
Résultat true if authorized else false

is_static_resource() protected méthode

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 méthode

protected mkRootUrl ( )

Property Details

$realm protected_oe property

protected $realm

$static_resource_paths protected_oe property

protected $static_resource_paths