\midcom_services_auth_frontend

Authentication frontend, responsible for rendering the login screen, reading the credentials and displaying access denied information.

Configuration, if necessary, should be done using the MidCOM configuration system, prefixing all values with 'authfrontend$name_', e.g. 'auth_frontend_form_cssclass'.

Summary

Methods
Constants
read_login_data()
show_login_page()
show_access_denied()
show_login_form()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

read_login_data()

read_login_data(\Symfony\Component\HttpFoundation\Request  $request) : Array

This call should process the current authentication credentials and return the username / password pair that should be tried to authentication or null for anonymous access.

Parameters

\Symfony\Component\HttpFoundation\Request $request

The request we're reading from

Returns

Array —

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.

show_login_page()

show_login_page() 

Show a complete login page unconditionally and exit afterwards.

show_access_denied()

show_access_denied(string  $message) 

This is called by throw new midcom_error_forbidden(.

..)

Parameters

string $message

The message to show to the user.

show_login_form()

show_login_form() 

This call should show the authentication form (or whatever means of input you use).

You should use HTTP POST to submit the form data to the page you originated from.

You MAY send HTTP Authentication headers if your auth driver uses them and stop execution immediately afterwards. (2DO: How to treat sent content (it is in the output buffer) at this point?)