com\setasign\SetaSite\Controller\BackendV2
User Class Controller Json
File: /SetaSite/src/Controller/BackendV2/User.php
Class hierarchy
Implements
Summary
Methods
- __construct()
- addCorsHeaders()
- errorAction()
- getParam()
- getParams()
- getRequest()
- getResponse()
- getSession()
- getUserPropertiesAction()
- keepAliveAction()
- keepSessionAliveAction()
- listAction()
- loginAction()
- logoutAction()
- preflightAction()
- renderView()
- resetResponse()
- saveAction()
- setParam()
- setParams()
- setPasswordAction()
- setSystemLanguageAction()
- ssoAuthAction()
- ssoLoginAction()
Constants
EVENT_AFTER_LOGIN
Will be called after the user is logged in.
Type: UserEvent
extraParams:
'session' => Session
EVENT_AFTER_LOGOUT
Will be called after the user logged out.
Type: UserEvent
Type: UserEvent
EVENT_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
Will be called before the user logged out.
Type: UserEvent
extraParams:
'session' => Session
EVENT_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
$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.
Methods
__construct()
\com\setasign\SetaSite\SessionContext $sessionContext,
\com\setasign\SetaFramework\Application\ApplicationConfig $config,
\com\setasign\SetaFramework\Http\HttpFactoryInterface $httpFactory
Parameters
- $users: \com\setasign\SetaSite\User\Users
- $sessionContext: \com\setasign\SetaSite\SessionContext
- $config: \com\setasign\SetaFramework\Application\ApplicationConfig
- $httpFactory: \com\setasign\SetaFramework\Http\HttpFactoryInterface
addCorsHeaders()
Parameters
- $response: \Psr\Http\Message\ResponseInterface
getParam()
mixed $default = null
Returns a param if it exists otherwise this will return $default
Parameters
- $name: string
- $default: mixed
getRequest()
getResponse()
getSession()
getUserPropertiesAction()
No login required!
Parameters
- $userProperties: \com\setasign\SetaSite\Config\UserProperties
loginAction()
\com\setasign\SetaSite\Controller\Backend\LoginTryLimiter $loginTryLimiter,
\com\setasign\SetaSite\Controller\Backend\BackendSsoHelper $ssoHelper,
\com\setasign\SetaSite\Module\ModuleManager $moduleManager
Parameters
- $eventManager: \com\setasign\SetaFramework\EventManager\EventManager
- $loginTryLimiter: \com\setasign\SetaSite\Controller\Backend\LoginTryLimiter
- $ssoHelper: \com\setasign\SetaSite\Controller\Backend\BackendSsoHelper
- $moduleManager: \com\setasign\SetaSite\Module\ModuleManager
Exceptions
Throws \com\setasign\SetaSite\Exception
Throws \com\setasign\SetaSite\User\InvalidLoginException
logoutAction()
Parameters
- $eventManager: \com\setasign\SetaFramework\EventManager\EventManager
Exceptions
saveAction()
Parameters
- $userProperties: \com\setasign\SetaSite\Config\UserProperties
Exceptions
Throws \com\setasign\SetaSite\PropertyContainer\InvalidValueException
setParam()
mixed $value
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
ssoAuthAction()
\com\setasign\SetaSite\Controller\Backend\BackendSsoHelper $ssoHelper
Login into the sso IdP
Parameters
- $requestPathPrefix: \com\setasign\SetaFramework\Bootstrap\RequestPathPrefix
- $ssoHelper: \com\setasign\SetaSite\Controller\Backend\BackendSsoHelper
ssoLoginAction()
\com\setasign\SetaFramework\EventManager\EventManager $eventManager,
\com\setasign\SetaSite\Module\ModuleManager $moduleManager
Parameters
- $ssoHelper: \com\setasign\SetaSite\Controller\Backend\BackendSsoHelper
- $eventManager: \com\setasign\SetaFramework\EventManager\EventManager
- $moduleManager: \com\setasign\SetaSite\Module\ModuleManager
Exceptions
Throws \com\setasign\SetaSite\Exception
