Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Private Member Functions | Private Attributes | List of all members
eZ\Publish\Core\REST\Server\Controller\SessionController Class Reference
Inheritance diagram for eZ\Publish\Core\REST\Server\Controller\SessionController:

## Public Member Functions
| __construct (AuthenticatorInterface $authenticator, $tokenIntention, CsrfTokenManager $csrfTokenManager=null, TokenStorageInterface $csrfTokenStorage=null)
| refreshSessionAction ($sessionId, Request $request)
| Refresh given session. More...
Public Member Functions inherited from eZ\Publish\Core\REST\Server\Controller
| setInputDispatcher (InputDispatcher $inputDispatcher)
| setRouter (RouterInterface $router)
| setRepository (Repository $repository)
| setRequestParser (RequestParser $requestParser)

## Private Member Functions
| hasStoredCsrfToken ()
| Tests if a CSRF token is stored. More...
| checkCsrfToken (Request $request)
| Checks the presence / validity of the CSRF token. More...
| getCsrfToken ()
| Returns the csrf token for REST. More...

## Private Attributes
| $authenticator
| $csrfTokenManager
| $csrfTokenIntention

## Additional Inherited Members
Protected Member Functions inherited from eZ\Publish\Core\REST\Server\Controller
| getMediaType (Request $request)
| Extracts the requested media type from $request. More...
Protected Attributes inherited from eZ\Publish\Core\REST\Server\Controller
| $inputDispatcher
| $router
| $requestParser
| $repository

## Detailed Description

Definition at line 23 of file SessionController.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\REST\Server\Controller\SessionController::__construct | ( | AuthenticatorInterface | $authenticator,
|  |  | $tokenIntention,
|  | CsrfTokenManager | $csrfTokenManager = `null`,
|  | TokenStorageInterface | $csrfTokenStorage = `null`
| ) |  |

Definition at line 34 of file SessionController.php.

References eZ\Publish\Core\REST\Server\Controller\SessionController\$authenticator, and eZ\Publish\Core\REST\Server\Controller\SessionController\$csrfTokenManager.

## Member Function Documentation

## ◆ checkCsrfToken()

eZ\Publish\Core\REST\Server\Controller\SessionController::checkCsrfToken | ( | Request | $request | ) |
| private

Checks the presence / validity of the CSRF token.

Parameters

  Request | $request |

Exceptions

  UnauthorizedException | if the token is missing or invalid.

Definition at line 169 of file SessionController.php.

Referenced by eZ\Publish\Core\REST\Server\Controller\SessionController\refreshSessionAction().

## ◆ getCsrfToken()

eZ\Publish\Core\REST\Server\Controller\SessionController::getCsrfToken | ( |  | ) |
| private

Returns the csrf token for REST.

The token is generated if it doesn't exist.

Returns
  string The csrf token, or an empty string if csrf check is disabled.

Definition at line 199 of file SessionController.php.

## ◆ hasStoredCsrfToken()

eZ\Publish\Core\REST\Server\Controller\SessionController::hasStoredCsrfToken | ( |  | ) |
| private

Tests if a CSRF token is stored.

Returns
  bool

Definition at line 153 of file SessionController.php.

## ◆ refreshSessionAction()

eZ\Publish\Core\REST\Server\Controller\SessionController::refreshSessionAction | ( |  | $sessionId,
|  | Request | $request
| ) |  |

Refresh given session.

Parameters

  string | $sessionId |

Exceptions

Definition at line 101 of file SessionController.php.

References eZ\Publish\Core\REST\Server\Controller\SessionController\checkCsrfToken().

## Member Data Documentation

## ◆ $authenticator

eZ\Publish\Core\REST\Server\Controller\SessionController::$authenticator
| private

Definition at line 26 of file SessionController.php.

Referenced by eZ\Publish\Core\REST\Server\Controller\SessionController\__construct().

## ◆ $csrfTokenIntention

eZ\Publish\Core\REST\Server\Controller\SessionController::$csrfTokenIntention
| private

Definition at line 32 of file SessionController.php.

## ◆ $csrfTokenManager

eZ\Publish\Core\REST\Server\Controller\SessionController::$csrfTokenManager
| private

Definition at line 29 of file SessionController.php.

Referenced by eZ\Publish\Core\REST\Server\Controller\SessionController\__construct().

The documentation for this class was generated from the following file:

- SessionController.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.