[ Web Proxy ]
URL:
Viewing: https://adminforth.dev/docs/api/Back/interfaces/IAdminForthRestAPI/ [Back]  [Original]

IAdminForthRestAPI | Agent-first open-source admin panel framework
Skip to main content
On this page

IAdminForthRestAPI

Methods

processLoginCallbacks()

processLoginCallbacks(adminUser, toReturn, response, extra, sessionDuration?): 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

ParameterTypeDescription
adminUserAdminUserplugin/af pases current adminUser
toReturn{ allowedLogin: boolean; error?: string; redirectTo?: string; }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.allowedLoginboolean-
toReturn.error?string-
toReturn.redirectTo?string-
response?anyhttp response object
extra?HttpExtra-
sessionDuration?stringduration of session in format "1s", "1m", "1h", or "1d" (e.g., "30d" for 30 days)

Returns

Promise<void>


registerEndpoints()

registerEndpoints(server): void

Called by AdminForth to initialize all endpoints for REST API.

Parameters

ParameterType
serverIHttpServer

Returns

void

Previous
IAdminForthPlugin
Next
IAdminForthSingleFilter

Web Proxy Viewer  |  New URL  |  Original Page