Class BasicAuth
Provides an interface to HTTP basic authentication.
This utility class can be used to secure any request with basic
authentication. To do so, BasicAuth::requireLogin() from your
Controller's init() method or action handler method.
It also has a function to protect your entire site. See BasicAuth::protect_entire_site() for more information.
Methods summary
public static
|
#
requireLogin( string $realm, string|array $permissionCode )
Require basic authentication. Will request a username and password if none is given. |
public static
|
#
protect_entire_site( mixed $protect = true )
Enable protection of the entire site with basic authentication. |
public static
|
|
public static
|
|
public static
|
#
protect_site_if_necessary( )
Call |