com\setasign\SetaSite\Controller\BackendV2

User Class Controller Json

File: /SetaSite/src/Controller/BackendV2/User.php

Class hierarchy

Implements

Summary

Constants

EVENT_AFTER_LOGIN

public const User::EVENT_AFTER_LOGIN = 'setasite.backend_user_controller.after_login'

Will be called after the user is logged in.


Type: UserEvent
extraParams:
'session' => Session

EVENT_AFTER_LOGOUT

public const User::EVENT_AFTER_LOGOUT = 'setasite.backend_user_controller.after_logout'

Will be called after the user logged out.


Type: UserEvent
Type: UserEvent

EVENT_BEFORE_LOGIN

public const User::EVENT_BEFORE_LOGIN = 'setasite.backend_user_controller.before_login'

Will be called before the user is logged in but after username and password check.


Type: UserEvent
Cancelable: If the event is canceled, the user will not login
extraParams:
'request' => ServerRequest

EVENT_BEFORE_LOGOUT

public const User::EVENT_BEFORE_LOGOUT = 'setasite.backend_user_controller.before_logout'

Will be called before the user logged out.


Type: UserEvent
extraParams:
'session' => Session

EVENT_CHECK_LOGIN

public const User::EVENT_CHECK_LOGIN = 'setasite.backend_user_controller.check_login'

Will be called after the usual login checks are over.


Type: UserEvent
Cancelable: Can be canceled by throwing a InvalidLoginException.

Properties

$config

$data

Result data to convert to JSON.

$encodingOptions

Default JSON encoding is performed with the following options, which produces RFC4627-compliant JSON, capable of embedding into HTML.

default value of:

JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_SLASHES

$response

protected ?\Psr\Http\Message\ResponseInterface \com\setasign\SetaFramework\Controller\AbstractController::$response

$sessionContext

$textContentType

If true the response contentType will be 'text/html; charset=utf-8' instead of 'application/json'.

Needed for the IE. The IE will try to download 'application/json' responses from iframes.

$users

protected User::$users

Methods

addCorsHeaders()

public AbstractController::addCorsHeaders (
\Psr\Http\Message\ResponseInterface $response
): \Psr\Http\Message\ResponseInterface
Parameters
$response: \Psr\Http\Message\ResponseInterface
 

errorAction()

public AbstractController::errorAction (
void
): void

getParam()

public \com\setasign\SetaFramework\Controller\AbstractController::getParam (
string $name,
mixed $default = null
): ?mixed

Returns a param if it exists otherwise this will return $default

Parameters
$name: string
 
$default: mixed
 

getParams()

Get all existing params

getResponse()

public \com\setasign\SetaFramework\Controller\AbstractController::getResponse (
void
): \Psr\Http\Message\ResponseInterface

getUserPropertiesAction()

No login required!

Parameters
$userProperties: \com\setasign\SetaSite\Config\UserProperties
 

keepAliveAction()

public User::keepAliveAction (
void
): void

keepSessionAliveAction()

public User::keepSessionAliveAction (
void
): void

No login required!

listAction()

public User::listAction (
void
): void

preflightAction()

public AbstractController::preflightAction (
void
): void

renderView()

protected AbstractController::renderView (
void
): void
Exceptions

Throws \JsonException

setParam()

Sets a param

Parameters
$name: string
 
$value: mixed
 

setParams()

Set a array of params

Note: The params will be merged with the existing params!!

Parameters
$params: array
 

setPasswordAction()

setSystemLanguageAction()

public User::setSystemLanguageAction (
void
): void
Exceptions

Throws \com\setasign\SetaSite\Exception