Class DefaultUrlChecker
Default URL checker for CakePHP applications. Uses CakePHP Router.
Namespace: Authentication\UrlChecker
Property Summary
-
$_defaultOptions protected
array<string, mixed>Default Options
Method Summary
-
_getUrlFromRequest() protected
Returns current url.
-
_mergeDefaultOptions() protected
Merges given options with the defaults.
-
check() public
Checks the requests if it is the configured login action
Method Detail
_getUrlFromRequest() ¶ protected
_getUrlFromRequest(Psr\Http\Message\ServerRequestInterface $request, bool $getFullUrl = false): string
Returns current url.
Parameters
-
Psr\Http\Message\ServerRequestInterface$request Server Request
-
bool$getFullUrl optional Get the full URL or just the path
Returns
string_mergeDefaultOptions() ¶ protected
_mergeDefaultOptions(array<string, mixed> $options): array<string, mixed>
Merges given options with the defaults.
Parameters
-
array<string, mixed>$options Options to merge in
Returns
array<string, mixed>check() ¶ public
check(Psr\Http\Message\ServerRequestInterface $request, array|string $loginUrls, array<string, mixed> $options = []): bool
Checks the requests if it is the configured login action
Parameters
-
Psr\Http\Message\ServerRequestInterface$request -
array|string$loginUrls -
array<string, mixed>$options optional
Returns
boolProperty Detail
$_defaultOptions ¶ protected
Default Options
checkFullUrlWhether to check the full request URI.
Type
array<string, mixed>