CWP\Core\Control\CwpBasicAuthMiddleware
Synopsis
class CwpBasicAuthMiddleware
extends BasicAuthMiddleware
implements
PermissionProvider
{
- // members
- protected array $whitelistedIps = ;
- // methods
- public array getWhitelistedIps()
- public $this setWhitelistedIps()
- protected void checkMatchingURL()
- protected bool ipMatchesWhitelist()
- public array providePermissions()
Hierarchy
Extends
- SilverStripe\Security\BasicAuthMiddleware
Implements
- SilverStripe\Security\PermissionProvider
Members
protected
- $whitelistedIps
—
array
Whitelisted IP addresses will not be given a basic authentication prompt when other basic authentication rules via {@link BasicAuthMiddleware} are enabled.
Methods
protected
- checkMatchingURL() — Check for any whitelisted IP addresses. If one matches the current user's IP then return false early, otherwise allow the default {@link BasicAuthMiddleware} to continue its logic.
- ipMatchesWhitelist() — Check whether the current user's IP address is in the IP whitelist
public
- getWhitelistedIps()
- providePermissions() — Provide a permission code for users to be able to access the site in test mode (UAT sites). This will apply to any route other than those required to change your password.
- setWhitelistedIps()