com\setasign\SetaSite\Controller\Backend
User Class Controller Json
File: /SetaSite/src/Controller/Backend/User.php
Class hierarchy
- com\setasign\SetaFramework\Controller\AbstractJsonController
Implements
- \com\setasign\SetaFramework\Controller\ControllerInterface
Summary
Methods
- __construct()
- getParam()
- getParams()
- getRequest()
- getResponse()
- getSession()
- getUserPropertiesAction()
- keepAliveAction()
- keepSessionAliveAction()
- loginAction()
- logoutAction()
- renderView()
- resetResponse()
- 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
$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
$httpFactory
-
$response
-
$sessionContext
$setasite
$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
Methods
__construct()
\com\setasign\SetaSite\User\Users $users,
\com\setasign\SetaSite\SessionContext $sessionContext,
\com\setasign\SetaFramework\Http\HttpFactoryInterface $httpFactory
Parameters
- $setasite : \com\setasign\SetaSite\SetaSite
- $users : \com\setasign\SetaSite\User\Users
- $sessionContext : \com\setasign\SetaSite\SessionContext
- $httpFactory : \com\setasign\SetaFramework\Http\HttpFactoryInterface
getParam()
-
mixed $default = null
Returns a param if it exists otherwise this will return $default
Parameters
- $name : string
- $default : mixed
getParams()
-
Get all existing params
getRequest()
getResponse()
-
getSession()
getUserPropertiesAction()
No login required!
Parameters
- $userProperties : \com\setasign\SetaSite\Config\UserProperties
loginAction()
LoginTryLimiter $loginTryLimiter,
BackendSsoHelper $ssoHelper,
\com\setasign\SetaSite\Module\ModuleManager $moduleManager
Parameters
- $eventManager : \com\setasign\SetaFramework\EventManager\EventManager
- $loginTryLimiter : LoginTryLimiter
- $ssoHelper : 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
renderView()
-
Exceptions
Throws \JsonException
resetResponse()
-
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()
Login into the sso IdP
Parameters
- $config : \com\setasign\SetaFramework\Application\ApplicationConfig
- $ssoHelper : BackendSsoHelper
ssoLoginAction()
\com\setasign\SetaFramework\EventManager\EventManager $eventManager,
\com\setasign\SetaSite\Module\ModuleManager $moduleManager
Parameters
- $ssoHelper : BackendSsoHelper
- $eventManager : \com\setasign\SetaFramework\EventManager\EventManager
- $moduleManager : \com\setasign\SetaSite\Module\ModuleManager
Exceptions
Throws \com\setasign\SetaSite\Exception
