IAdminForthRestAPI
Methods
processLoginCallbacks()
processLoginCallbacks(
adminUser
,toReturn
,response
,extra
):Promise
<void
>
Called by login endpoint to process login callbacks. Also might be called by plugins, to prevent action if user is not allowed to login. For example signup or login via google might want to check if user is allowed to login by calling this method.
Parameters
Parameter | Type | Description |
---|---|---|
adminUser | AdminUser | plugin/af pases current adminUser |
toReturn | object | this is an object which will get status of login process. If at least one callback returns error or redirectTo, login process will be stopped (future callbacks will not be called). |
toReturn.allowedLogin | boolean | - |
toReturn.error ? | string | - |
toReturn.redirectTo ? | string | - |
response | any | http response object |
extra | HttpExtra | - |
Returns
Promise
<void
>
registerEndpoints()
registerEndpoints(
server
):void
Called by AdminForth to initialize all endpoints for REST API.
Parameters
Parameter | Type |
---|---|
server | IHttpServer |
Returns
void