WiseLoop PHP REST Services 3.3.1
RESTful web service API framework for PHP
wlRestControllerAuth Class Reference
Inheritance diagram for wlRestControllerAuth:

Public Member Functions

 __construct ($authHandler=null, $name= 'auth')

Protected Member Functions

 loginPost ()
 logoutPost ()
 userGet ()

Private Attributes

 $_authHandler

Detailed Description

WiseLoop wlRestControllerAuth class definition
This is the base authentication controller that should be registered in within a service in order to have authentication routes for the API.

$authHandler = new myAuthHandler();
$service->registerController(new wlRestControllerAuth($authHandler));
Author:
WiseLoop
See also:
wlAuthHandler

See also: Authentication & Authorization


Constructor & Destructor Documentation

__construct ( authHandler = null,
name = 'auth' 
)
Parameters:
wlAuthHandler$authHandlerthe auth handler that will authenticate the user
string$namethe service controller name

Member Function Documentation

loginPost ( ) [protected]

The corresponding method for the login route (a POST request).

Returns:
mixed|null
Exceptions:
wlRestException
logoutPost ( ) [protected]

The corresponding method for the logout route (a POST request).

userGet ( ) [protected]

The corresponding method for the user route (a GET request).


Field Documentation

$_authHandler [private]

Type: wlAuthHandler the auth handler that will authenticate the user

 All Data Structures Functions Variables