Get
in package
Get a session and all its information like the time of the user or password verification.
If no data is sent back from the Zitadel API for e.g. 2FA tokens, an error will occur when trying to access the data.
Some functions return a date in the format YYYY-MM-DDThh:mm:ss.fZ
e.g. 2024-04-08T14:37:09.846600Z
.
Table of Contents
Properties
- $changeDate : string
- $creationDate : string
- $expirationDate : string
- $idpVerifiedAt : string
- $optSmsVerifiedAt : string
- $otpEmailVerifiedAt : string
- $passwordVerifiedAt : string
- $sessionId : string
- $sessionToken : string
- $settings : array<string|int, mixed>
- $totpVerifiedAt : string
- $userDisplayName : string
- $userId : string
- $userLoginName : string
- $userOrganizationId : string
- $userVerifiedAt : string
Methods
- __construct() : mixed
- Initialize the Session create setup
- get() : void
- Fetch the session data
- getChangeDate() : string
- Returns the change date of the session
- getCreationDate() : string
- Returns the creation date of the session
- getEmailVerifiedAt() : string
- Returns the OTP Email verification date
- getExpirationDate() : string
- Returns the session expiration date
- getIdpVerifiedAt() : string
- Returns the IDP verification date
- getPasswordVerifiedAt() : string
- Returns the password verification date
- getSmsVerifiedAt() : string
- Returns the OTP SMS verification date
- getTotpVerifiedAt() : string
- Returns the TOTP code verification date
- getUserDisplayName() : string
- Returns the display name of the user
- getUserId() : string
- Returns the user id
- getUserLoginName() : string
- Returns the user login name e.g. doe@your-zitadel-instance.com
- getUserOrganizationId() : string
- Returns the organization id, the user is member of
- getUserVerifiedAt() : string
- Returns the user verification timestamp
- setSessionId() : void
- Set the session id (required).
- setSessionToken() : void
- Set the session token (required).
Properties
$changeDate
private
string
$changeDate
$creationDate
private
string
$creationDate
$expirationDate
private
string
$expirationDate
$idpVerifiedAt
private
string
$idpVerifiedAt
$optSmsVerifiedAt
private
string
$optSmsVerifiedAt
$otpEmailVerifiedAt
private
string
$otpEmailVerifiedAt
$passwordVerifiedAt
private
string
$passwordVerifiedAt
$sessionId
private
string
$sessionId
$sessionToken
private
string
$sessionToken
$settings
private
array<string|int, mixed>
$settings
$totpVerifiedAt
private
string
$totpVerifiedAt
$userDisplayName
private
string
$userDisplayName
$userId
private
string
$userId
$userLoginName
private
string
$userLoginName
$userOrganizationId
private
string
$userOrganizationId
$userVerifiedAt
private
string
$userVerifiedAt
Methods
__construct()
Initialize the Session create setup
public
__construct(mixed $settings) : mixed
Parameters
- $settings : mixed
-
array The settings array
get()
Fetch the session data
public
get() : void
Tags
getChangeDate()
Returns the change date of the session
public
getChangeDate() : string
Return values
string —ISO-8601 Timestamp
getCreationDate()
Returns the creation date of the session
public
getCreationDate() : string
Return values
string —ISO-8601 Timestamp
getEmailVerifiedAt()
Returns the OTP Email verification date
public
getEmailVerifiedAt() : string
Return values
string —ISO-8601 Timestamp
getExpirationDate()
Returns the session expiration date
public
getExpirationDate() : string
Return values
string —ISO-8601 Timestamp
getIdpVerifiedAt()
Returns the IDP verification date
public
getIdpVerifiedAt() : string
Return values
string —ISO-8601 Timestamp
getPasswordVerifiedAt()
Returns the password verification date
public
getPasswordVerifiedAt() : string
Return values
string —ISO-8601 Timestamp
getSmsVerifiedAt()
Returns the OTP SMS verification date
public
getSmsVerifiedAt() : string
Return values
string —ISO-8601 Timestamp
getTotpVerifiedAt()
Returns the TOTP code verification date
public
getTotpVerifiedAt() : string
Return values
string —ISO-8601 Timestamp
getUserDisplayName()
Returns the display name of the user
public
getUserDisplayName() : string
Return values
string —ISO-8601 Timestamp
getUserId()
Returns the user id
public
getUserId() : string
Return values
string —ISO-8601 Timestamp
getUserLoginName()
Returns the user login name e.g. doe@your-zitadel-instance.com
public
getUserLoginName() : string
Return values
string —ISO-8601 Timestamp
getUserOrganizationId()
Returns the organization id, the user is member of
public
getUserOrganizationId() : string
Return values
string —ISO-8601 Timestamp
getUserVerifiedAt()
Returns the user verification timestamp
public
getUserVerifiedAt() : string
Return values
string —ISO-8601 Timestamp
setSessionId()
Set the session id (required).
public
setSessionId(string $sessionId) : void
Parameters
- $sessionId : string
-
The session id
setSessionToken()
Set the session token (required).
public
setSessionToken(string $sessionToken) : void
Parameters
- $sessionToken : string
-
The session token