CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (Github)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C Authentication 2.x API

  • Project:
    • Authentication
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 2.x
      • 3.x
      • 2.x

Namespaces

  • Authentication
    • Authenticator
    • Controller
    • Identifier
    • Middleware
    • PasswordHasher
    • UrlChecker
    • View

Class CakeRouterUrlChecker

Checks if a request object contains a valid URL

Namespace: Authentication\UrlChecker

Property Summary

  • $_defaultOptions protected
    array

    Default Options

Method Summary

  • _getChecker() protected

    Gets the checker function name or a callback

  • _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

_getChecker() ¶ protected

_getChecker(array $options = []): string|callable

Gets the checker function name or a callback

Parameters
array $options optional

Array of options

Returns
string|callable

_getUrlFromRequest() ¶ protected

_getUrlFromRequest(Psr\Http\Message\UriInterface $uri, bool $getFullUrl = false): string

Returns current url.

Parameters
Psr\Http\Message\UriInterface $uri

Server Request

bool $getFullUrl optional

Get the full URL or just the path

Returns
string

_mergeDefaultOptions() ¶ protected

_mergeDefaultOptions(array $options): array

Merges given options with the defaults.

The reason this method exists is that it makes it easy to override the method and inject additional options without the need to use the MergeVarsTrait.

Parameters
array $options

Options to merge in

Returns
array

check() ¶ public

check(Psr\Http\Message\ServerRequestInterface $request, string|array $loginUrls, array $options = []): bool

Checks the requests if it is the configured login action

Parameters
Psr\Http\Message\ServerRequestInterface $request
string|array $loginUrls
array $options optional
Returns
bool

Property Detail

$_defaultOptions ¶ protected

Default Options

  • checkFullUrl Whether or not to check the full request URI.
Type
array
OpenHub
Pingping
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (Github)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs