MockAuth Class Reference

A mock implementation of op5Auth, which defines a hard coded user "mockeduser", which is authorized to do anything. More...

Public Member Functions

 __construct ($config)
 Create and return a new MockAuth instance.
 authorized_for ($authpoint)
 Returns true if current session has access for a given authorization point, which is always for this implementation.
 get_user ()
 Returns the currently logged in user, which is a fixture "mockeduser" for this implementation.

Detailed Description

A mock implementation of op5Auth, which defines a hard coded user "mockeduser", which is authorized to do anything.


Constructor & Destructor Documentation

MockAuth::__construct ( config  ) 

Create and return a new MockAuth instance.

The $config paramater can contain an element "denied_authpoints" which contains a list of authpoints which this instance will deny on invocation of authorized_for()

Parameters:
$config array configuration for the new instance
Returns:
MockAuth the constructed instance

Member Function Documentation

MockAuth::authorized_for ( authpoint  ) 

Returns true if current session has access for a given authorization point, which is always for this implementation.

Parameters:
$authpoint string
Returns:
boolean true if access
MockAuth::get_user (  ) 

Returns the currently logged in user, which is a fixture "mockeduser" for this implementation.

Returns:
mixed

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1