PHP Интерфейс RESTfulAPI_Authenticator

Автор: Thierry Francois @colymba [email protected]
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
authenticate ( SS_HTTPRequest $request ) : true | RESTfulAPI_Error Checks if a request to the API is authenticated
getOwner ( SS_HTTPRequest $request ) : null | DataObject Returns the DataObject related to the authenticated request

Описание методов

authenticate() публичный Метод

Checks if a request to the API is authenticated
public authenticate ( SS_HTTPRequest $request ) : true | RESTfulAPI_Error
$request SS_HTTPRequest HTTP API request
Результат true | RESTfulAPI_Error True if token is valid OR RESTfulAPI_Error with details

getOwner() публичный Метод

Returns the DataObject related to the authenticated request
public getOwner ( SS_HTTPRequest $request ) : null | DataObject
$request SS_HTTPRequest HTTP API request
Результат null | DataObject null if failed or the DataObject related to the request