CwpBasicAuthMiddleware
class CwpBasicAuthMiddleware extends BasicAuthMiddleware implements PermissionProvider (View source)
Properties
protected | array | $urlPatterns | URL Patterns for basic auth. Keys are the Regexp string to match, and the key can be one of the below:
|
from BasicAuthMiddleware |
protected | array | $whitelistedIps | Whitelisted IP addresses will not be given a basic authentication prompt when other basic authentication rules via BasicAuthMiddleware are enabled. |
Methods
Check for any whitelisted IP addresses. If one matches the current user's IP then return false early, otherwise allow the default BasicAuthMiddleware to continue its logic.
Check whether the current user's IP address is in the IP whitelist
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.
Details
HTTPResponse
process(HTTPRequest $request, callable $delegate)
Generate response for the given request
array
getURLPatterns()
Get list of url patterns
$this
setURLPatterns(array $urlPatterns)
No description
protected bool|string|array|null
checkMatchingURL(HTTPRequest $request)
Check for any whitelisted IP addresses. If one matches the current user's IP then return false early, otherwise allow the default BasicAuthMiddleware to continue its logic.
{@inheritDoc}
array
getWhitelistedIps()
No description
$this
setWhitelistedIps(string|string[] $whitelistedIps)
No description
protected bool
ipMatchesWhitelist()
Check whether the current user's IP address is in the IP whitelist
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.