Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Fields | |
const | XML_PATH_SESSION_LIFETIME = 'admin/security/session_lifetime' |
![]() | |
const | HOST_KEY = '_session_hosts' |
Protected Attributes | |
$_isFirstAfterLogin | |
$_aclBuilder | |
$_backendUrl | |
$_config | |
![]() | |
$defaultDestroyOptions = ['send_expire_cookie' => true, 'clear_storage' => true] | |
$validator | |
$request | |
$sidResolver | |
$sessionConfig | |
$saveHandler | |
$storage | |
$cookieManager | |
$cookieMetadataFactory | |
Additional Inherited Members | |
![]() | |
registerSaveHandler () | |
_addHost () | |
_getHosts () | |
_cleanHosts () | |
clearSubDomainSessionCookie () | |
![]() | |
static | $urlHostCache = [] |
@api @method \Magento\User\Model\User|null getUser() @method \Magento\Backend\Model\Auth\Session setUser(\Magento\User\Model\User $value) @method \Magento\Framework\Acl|null getAcl() @method \Magento\Backend\Model\Auth\Session setAcl(\Magento\Framework\Acl $value) @method int getUpdatedAt() @method \Magento\Backend\Model\Auth\Session setUpdatedAt(int $value)
@SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 27 of file Session.php.
__construct | ( | \Magento\Framework\App\Request\Http | $request, |
\Magento\Framework\Session\SidResolverInterface | $sidResolver, | ||
\Magento\Framework\Session\Config\ConfigInterface | $sessionConfig, | ||
\Magento\Framework\Session\SaveHandlerInterface | $saveHandler, | ||
\Magento\Framework\Session\ValidatorInterface | $validator, | ||
\Magento\Framework\Session\StorageInterface | $storage, | ||
CookieManagerInterface | $cookieManager, | ||
CookieMetadataFactory | $cookieMetadataFactory, | ||
\Magento\Framework\App\State | $appState, | ||
\Magento\Framework\Acl\Builder | $aclBuilder, | ||
\Magento\Backend\Model\UrlInterface | $backendUrl, | ||
\Magento\Backend\App\ConfigInterface | $config | ||
) |
\Magento\Framework\App\Request\Http | $request | |
\Magento\Framework\Session\SidResolverInterface | $sidResolver | |
\Magento\Framework\Session\Config\ConfigInterface | $sessionConfig | |
\Magento\Framework\Session\SaveHandlerInterface | $saveHandler | |
\Magento\Framework\Session\ValidatorInterface | $validator | |
\Magento\Framework\Session\StorageInterface | $storage | |
CookieManagerInterface | $cookieManager | |
CookieMetadataFactory | $cookieMetadataFactory | |
\Magento\Framework\App\State | $appState | |
\Magento\Framework\Acl\Builder | $aclBuilder | |
\Magento\Backend\Model\UrlInterface | $backendUrl | |
\Magento\Backend\App\ConfigInterface | $config |
Definition at line 74 of file Session.php.
isAllowed | ( | $resource, | |
$privilege = null |
|||
) |
Check current user permission on resource and privilege
string | $resource | |
string | $privilege |
Definition at line 135 of file Session.php.
isFirstPageAfterLogin | ( | ) |
Check if it is the first page after successful login
Definition at line 192 of file Session.php.
isLoggedIn | ( | ) |
Check if user is logged in
Implements StorageInterface.
Definition at line 160 of file Session.php.
isValidForPath | ( | $path | ) |
Skip path validation in backend area
string | $path |
Implements SessionManagerInterface.
Definition at line 252 of file Session.php.
processLogin | ( | ) |
Process of configuring of current auth storage when login was performed
Implements StorageInterface.
Definition at line 217 of file Session.php.
processLogout | ( | ) |
Process of configuring of current auth storage when logout was performed
Implements StorageInterface.
Definition at line 238 of file Session.php.
prolong | ( | ) |
Set session UpdatedAt to current time
Implements StorageInterface.
Definition at line 170 of file Session.php.
refreshAcl | ( | $user = null | ) |
Refresh ACL resources stored in session
\Magento\User\Model\User | $user |
Definition at line 110 of file Session.php.
setIsFirstPageAfterLogin | ( | $value | ) |
Setter whether the current/next page should be treated as first page after login
bool | $value |
Definition at line 206 of file Session.php.
|
protected |
Definition at line 46 of file Session.php.
|
protected |
Definition at line 51 of file Session.php.
|
protected |
Definition at line 56 of file Session.php.
|
protected |
Definition at line 39 of file Session.php.
const XML_PATH_SESSION_LIFETIME = 'admin/security/session_lifetime' |
Admin session lifetime config path
Definition at line 32 of file Session.php.