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 3.x API

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

Namespaces

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

Class AuthenticationMiddleware

Authentication Middleware

Namespace: Authentication\Middleware

Property Summary

  • $container protected
    Cake\Core\ContainerInterface|null

    The container instance from the application

  • $subject protected
    Authentication\AuthenticationServiceInterface|Authentication\AuthenticationServiceProviderInterface

    Authentication service or application instance.

Method Summary

  • __construct() public

    Constructor

  • getAuthenticationService() protected

    Returns AuthenticationServiceInterface instance.

  • process() public

    Callable implementation for the middleware stack.

Method Detail

__construct() ¶ public

__construct(Authentication\AuthenticationServiceInterface|Authentication\AuthenticationServiceProviderInterface $subject, Cake\Core\ContainerInterface|null $container = null)

Constructor

Parameters
Authentication\AuthenticationServiceInterface|Authentication\AuthenticationServiceProviderInterface $subject

Authentication service or application instance.

Cake\Core\ContainerInterface|null $container optional

The container instance from the application.

getAuthenticationService() ¶ protected

getAuthenticationService(Psr\Http\Message\ServerRequestInterface $request): Authentication\AuthenticationServiceInterface

Returns AuthenticationServiceInterface instance.

Parameters
Psr\Http\Message\ServerRequestInterface $request

Server request.

Returns
Authentication\AuthenticationServiceInterface
Throws
RuntimeException
When authentication method has not been defined.

process() ¶ public

process(ServerRequestInterface $request, RequestHandlerInterface $handler): Psr\Http\Message\ResponseInterface

Callable implementation for the middleware stack.

Processes an incoming server request in order to produce a response. If unable to produce the response itself, it may delegate to the provided request handler to do so.

Parameters
ServerRequestInterface $request

The request.

RequestHandlerInterface $handler

The request handler.

Returns
Psr\Http\Message\ResponseInterface

Property Detail

$container ¶ protected

The container instance from the application

Type
Cake\Core\ContainerInterface|null

$subject ¶ protected

Authentication service or application instance.

Type
Authentication\AuthenticationServiceInterface|Authentication\AuthenticationServiceProviderInterface
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