$auth_credentials_found : boolean
Flag, which is set to true if the system encountered any new login credentials during startup. If this is true, but no user is authenticated, login did fail.
Form-based authentication frontend. This one is rather simple, it just renders a two-field (username/password) form which is targeted at the current URL.
read_login_data(\Symfony\Component\HttpFoundation\Request $request) : Array
This call checks whether the two form fields we have created are present, if yes it reads and returns their values.
The request we're reading from
A simple associative array with the two indexes 'username' and 'password' holding the information read by the driver or null if no information could be read.
If the current style has an element called <i>midcom_services_auth_login_page</i> it will be shown instead. The local scope will contain the two variables $title and $login_warning. $title is the localized string 'login' from the main MidCOM L10n DB, login_warning is empty unless there was a failed authentication attempt, in which case it will have a localized warning message enclosed in a paragraph with the ID 'login_warning'.
This will display the error message and appends the login form below it if and only if the headers have not yet been sent.
The function will clear any existing output buffer, and the sent page will have the 403 - Forbidden HTTP Status. The login will relocate to the same URL, so it should be mostly transparent.
The login message shown depends on the current state:
This function will exit() unconditionally.
If the style element midcom_services_auth_access_denied is defined, it will be shown instead of the default error page. The following variables will be available in the local scope:
$title contains the localized title of the page, based on the 'access denied' string ID of the main MidCOM L10n DB. $message will contain the notification what went wrong and $login_warning will notify the user of a failed login. The latter will either be empty or enclosed in a paragraph with the CSS ID 'login_warning'.
The message to show to the user.
This call renders a simple form without any formatting (that is to be done by the callee) that asks the user for his username and password.
If you want to replace the form by some custom style, you can define the style element midcom_services_auth_frontend_form. In that case you should look into the source of it to see exactly what is required. The output from the frontend is surrounded by a div tag whose CSS ID is set to 'midcom_login_form'.