Piwik\Plugins\Login\

SessionInitializer

This SessionInitializer is no longer used, but is kept for backwards compatibility.

Session management no longer uses the piwik_auth cookie.

Methods

The class defines the following methods:

__construct()

Constructor.

Signature

  • It accepts the following parameter(s):

    • $usersManagerAPI (Piwik\Plugins\UsersManager\API|null) —

    • $authCookieName (string|null) —

    • $authCookieValidTime (int|null) —

    • $authCookiePath (string|null) —

initSession()

Authenticates the user and, if successful, initializes an authenticated session.

Signature

  • It accepts the following parameter(s):
    • $auth (Auth) — The Auth implementation to use.
    • $rememberMe (bool) — Whether the authenticated session should be remembered after the browser is closed or not.
  • It does not return anything or a mixed result.
  • It throws one of the following exceptions:
    • Exception — If authentication fails or the user is not allowed to login for some reason.

getHashTokenAuth()

Accessor to compute the hashed authentication token.

Signature

  • It accepts the following parameter(s):

    • $login (string) — user login
    • $token_auth (string) — authentication token
  • Returns: string — hashed authentication token