BEdita API doc | 4-cactus
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Download

Namespaces

  • BEdita
    • API
      • Auth
      • Controller
        • Admin
        • Component
        • Model
      • Error
      • Event
      • Exception
      • Middleware
      • Model
        • Action
      • Network
        • Exception
      • Shell
      • TestSuite
      • Utility
    • Core
      • Configure
        • Engine
      • Database
        • Type
      • Exception
      • Filesystem
        • Adapter
        • Exception
        • Thumbnail
      • I18n
      • Job
        • Service
      • Mailer
        • Preview
        • Transport
      • Model
        • Action
        • Behavior
        • Entity
        • Table
        • Validation
      • ORM
        • Inheritance
        • Locator
        • Rule
      • Shell
        • Task
      • State
      • TestSuite
        • Fixture
      • Utility

Classes

  • CommonEventHandler

Class CommonEventHandler

CommonEventsHandler class.

This class contains common event listener attached bootstrapping the API plugin

BEdita\API\Event\CommonEventHandler implements Cake\Event\EventListenerInterface
Namespace: BEdita\API\Event
Since: 4.0.0
Located at API/src/Event/CommonEventHandler.php

Methods summary

public
# implementedEvents( )
public
# buildMiddlewareStack( Cake\Event\Event $event, Cake\Http\MiddlewareQueue $middleware )

Customize middlewares for API needs

Customize middlewares for API needs

Setup CORS from configuration An optional 'CORS' key in should be like this example:

'CORS' => [
  'allowOrigin' => '*.example.com',
  'allowMethods' => ['GET', 'POST'],
  'allowHeaders' => ['X-CSRF-Token']
]

Parameters

$event
The event object
$middleware
The middleware queue

See

\BEdita\API\Middleware\CorsMiddleware to more info on CORS configuration
public
# afterIdentify( Cake\Event\Event $event, array $user )

Set the user identified. Called after user authentication.

Set the user identified. Called after user authentication.

Parameters

$event
The event object
$user
The user data

Throws

Cake\Http\Exception\UnauthorizedException
BEdita API doc | 4-cactus API documentation generated by ApiGen