mediatekformation

UsageTrackingTokenStorage
in package
implements TokenStorageInterface, ServiceSubscriberInterface

A token storage that increments the session usage index when the token is accessed.

Tags
author

Nicolas Grekas p@tchwork.com

Interfaces, Classes, Traits and Enums

TokenStorageInterface
The TokenStorageInterface.
ServiceSubscriberInterface
A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method.

Table of Contents

$enableUsageTracking  : mixed
$sessionLocator  : mixed
$storage  : mixed
__construct()  : mixed
disableUsageTracking()  : void
enableUsageTracking()  : void
getSubscribedServices()  : array<string|int, string>
Returns an array of service types required by such instances, optionally keyed by the service names used internally.
getToken()  : TokenInterface|null
Returns the current security token.
setToken()  : void
Sets the authentication token.

Properties

Methods

getSubscribedServices()

Returns an array of service types required by such instances, optionally keyed by the service names used internally.

public static getSubscribedServices() : array<string|int, string>

For mandatory dependencies:

  • ['logger' => 'Psr\Log\LoggerInterface'] means the objects use the "logger" name internally to fetch a service which must implement Psr\Log\LoggerInterface.
  • ['loggers' => 'Psr\Log\LoggerInterface[]'] means the objects use the "loggers" name internally to fetch an iterable of Psr\Log\LoggerInterface instances.
  • ['Psr\Log\LoggerInterface'] is a shortcut for
  • ['Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface']

otherwise:

  • ['logger' => '?Psr\Log\LoggerInterface'] denotes an optional dependency
  • ['loggers' => '?Psr\Log\LoggerInterface[]'] denotes an optional iterable dependency
  • ['?Psr\Log\LoggerInterface'] is a shortcut for
  • ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface']
Return values
array<string|int, string>

The required service types, optionally keyed by service names

setToken()

Sets the authentication token.

public setToken([TokenInterface $token = null ]) : void
Parameters
$token : TokenInterface = null

A TokenInterface token, or null if no further authentication information should be stored

Return values
void

Search results