src/Security/BasicAuthMiddleware.php
protected function checkMatchingURL(HTTPRequest $request)
    {
        // Null if no permissions enabled
        $patterns = $this->getURLPatterns();
        if (!$patterns) {
            return null;
        }

        // Filter redirect based on url
        $relativeURL = $request->getURL(true);
        foreach ($patterns as $pattern => $result) {
            if (preg_match($pattern, $relativeURL)) {
                return $result;
            }
        }

        // No patterns match
        return null;
    }
protected function checkMatchingURL(HTTPRequest $request)
    {
        // Null if no permissions enabled
        $patterns = $this->getURLPatterns();
        if (!$patterns) {
            return null;
        }

        // Filter redirect based on url
        $relativeURL = $request->getURL(true);
        foreach ($patterns as $pattern => $result) {
            if (preg_match($pattern, $relativeURL)) {
                return $result;
            }
        }

        // No patterns match
        return null;
    }
protected function checkMatchingURL ( HTTPRequest $ request ) { // Null if no permissions enabled $ patterns = $ this -> getURLPatterns ( ) ; if ( ! $ patterns ) { return null ; } // Filter redirect based on url $ relativeURL = $ request -> getURL ( true ) ; foreach ( $ patterns as $ pattern => $ result ) { if ( preg_match ( $ pattern , $ relativeURL ) ) { return $ result ; } } // No patterns match return null ; }
Check if global basic auth is enabled for the given request

@param HTTPRequest $request
@return bool|string|array|null boolean value if enabled/disabled explicitly for this request,
or null if should fall back to config value. Can also provide an explicit string / array of permission
codes to require for this requset.
Check if global basic auth is enabled for the given request