Overview
What is an extension for?
With Login Page Extensions custom code can be added to Login Pages.
There are different extension points with different purposes.
As the login page code is a thin layer of PHP on top of IACBOX core componentes, all extensions need to be written in PHP 8.2.
Extension points
An extension can be one of those 4 types.
Purpose | Parent class name | Description |
---|---|---|
Custom Element | ElementExtension | Add a custom element with custom properties to be used on any login page. This adds HTML and/or Javascript to the Login Page. |
Login Method | LoginMethodExtension | Add a custom login method. Authenticate against any other backend or cloud service. |
Request Handler | RequestHandlerExtension | A handler intercepts each request before the login page logic and page rendering starts. |
Base extension | Extension | Choose this to start from scratch and implement one of the event listeners. |
Handler for elements
This interface is only available for classes based on ExtensionElement
.
Extension point | Interface name | Description |
---|---|---|
Request handler per Element | ElementRequestHandler | Add logic to process a form submission or action links rendered in a custom element |
Event listener
This listener types can be used with any type
Listener purpose | Interface name | Description |
---|---|---|
Do something before a login form gets processed | FormPostEntryListener | Good extension point for reacting on (successful) logins. |
Do something after a login form was processed | FormPostLeaveListener | For example: Send the given email address of a guest to a CRM. Or trigger any web-hook of a cloud service after a login. |
Intercept page rendering | PrepareForRenderListener | This intercepts the rendering of each slot. With this rendered HTML can be manipulated - for example: adding an input field to any login method. |
Make an extension configurable
Purpose | Interface name | Description |
---|---|---|
Show configuration in editor | ConfigurableLpExtension | Reveal settings in the Login Page Editor to set different values per IACBOX or the values are secrets that should not be hard coded in the code. Different UI elements can be displayed like input fields, selects and checkboxes. |