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. |
A mock implementation of op5Auth, which defines a hard coded user "mockeduser", which is authorized to do anything.
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()
$config | array configuration for the new instance |
MockAuth::authorized_for | ( | $ | authpoint | ) |
Returns true if current session has access for a given authorization point, which is always for this implementation.
$authpoint | string |
MockAuth::get_user | ( | ) |
Returns the currently logged in user, which is a fixture "mockeduser" for this implementation.