|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (ConfigInterface $securityConfig, \Magento\Backend\Model\Auth\Session $authSession, \Magento\Security\Model\AdminSessionInfoFactory $adminSessionInfoFactory, \Magento\Security\Model\ResourceModel\AdminSessionInfo\CollectionFactory $adminSessionInfoCollectionFactory, \Magento\Framework\Stdlib\DateTime\DateTime $dateTime, RemoteAddress $remoteAddress) | |
| processLogin () | |
| processProlong () | |
| processLogout () | |
| getCurrentSession () | |
| getLogoutReasonMessageByStatus ($statusCode) | |
| getLogoutReasonMessage () | |
| getSessionsForCurrentUser () | |
| logoutOtherUserSessions () | |
| cleanExpiredSessions () | |
Data Fields | |
| const | ADMIN_SESSION_LIFETIME = 86400 |
| const | LOGOUT_REASON_USER_LOCKED = 10 |
Protected Member Functions | |
| createNewSession () | |
| createAdminSessionInfoCollection () | |
Protected Attributes | |
| $securityConfig | |
| $authSession | |
| $adminSessionInfoFactory | |
| $adminSessionInfoCollectionFactory | |
| $currentSession | |
Admin Sessions Manager Model
@api
Definition at line 18 of file AdminSessionsManager.php.
| __construct | ( | ConfigInterface | $securityConfig, |
| \Magento\Backend\Model\Auth\Session | $authSession, | ||
| \Magento\Security\Model\AdminSessionInfoFactory | $adminSessionInfoFactory, | ||
| \Magento\Security\Model\ResourceModel\AdminSessionInfo\CollectionFactory | $adminSessionInfoCollectionFactory, | ||
| \Magento\Framework\Stdlib\DateTime\DateTime | $dateTime, | ||
| RemoteAddress | $remoteAddress | ||
| ) |
| ConfigInterface | $securityConfig | |
| \Magento\Backend\Model\Auth\Session | $authSession | |
| AdminSessionInfoFactory | $adminSessionInfoFactory | |
| CollectionFactory | $adminSessionInfoCollectionFactory | |
| \Magento\Framework\Stdlib\DateTime\DateTime | $dateTime | |
| RemoteAddress | $remoteAddress |
Definition at line 86 of file AdminSessionsManager.php.
| cleanExpiredSessions | ( | ) |
Clean expired Admin Sessions
Definition at line 276 of file AdminSessionsManager.php.
|
protected |
Definition at line 311 of file AdminSessionsManager.php.
|
protected |
Create new record
Definition at line 291 of file AdminSessionsManager.php.
| getCurrentSession | ( | ) |
Get current session record
Definition at line 173 of file AdminSessionsManager.php.
| getLogoutReasonMessage | ( | ) |
Get message with explanation of logout reason
Definition at line 226 of file AdminSessionsManager.php.
| getLogoutReasonMessageByStatus | ( | $statusCode | ) |
Get logout reason message by status
| int | $statusCode |
Definition at line 190 of file AdminSessionsManager.php.
| getSessionsForCurrentUser | ( | ) |
Get sessions for current user
Definition at line 239 of file AdminSessionsManager.php.
| logoutOtherUserSessions | ( | ) |
Logout another user sessions
Definition at line 253 of file AdminSessionsManager.php.
| processLogin | ( | ) |
Handle all others active sessions according Sharing Account Setting
Definition at line 108 of file AdminSessionsManager.php.
| processLogout | ( | ) |
Handle logout process
Definition at line 156 of file AdminSessionsManager.php.
| processProlong | ( | ) |
Handle Prolong process
Definition at line 134 of file AdminSessionsManager.php.
|
protected |
Definition at line 52 of file AdminSessionsManager.php.
|
protected |
Definition at line 46 of file AdminSessionsManager.php.
|
protected |
Definition at line 40 of file AdminSessionsManager.php.
|
protected |
Definition at line 58 of file AdminSessionsManager.php.
|
protected |
Definition at line 34 of file AdminSessionsManager.php.
| const ADMIN_SESSION_LIFETIME = 86400 |
Admin Session lifetime (sec)
Definition at line 23 of file AdminSessionsManager.php.
| const LOGOUT_REASON_USER_LOCKED = 10 |
Logout reason when current user has been locked out
Definition at line 28 of file AdminSessionsManager.php.