Zitadel PHP Client 1.3.6
PHP Client for Zitadel
Loading...
Searching...
No Matches
Update Class Reference

Public Member Functions

 __construct (array $settings)
 
 setSessionId (string $sessionId)
 
 setSessionToken (string $sessionToken)
 
 setPassword (string $password)
 
 setIdpIntentId (string $idpIntentId)
 
 setIdpIntentToken (string $idpIntentToken)
 
 setTOTPCode (string $totpCode)
 
 setSmsCode (string $smsCode)
 
 setOtpEmail (string $otpEmail)
 
 returnSmsCode ()
 
 returnEmailCode ()
 
 setLifetime (int $seconds)
 
 getSmsCode ()
 
 getEmailCode ()
 
 update ()
 

Detailed Description

Update a session. First, you have to set the session id and the session token. Then, you can define checks e.g. the Password or TOTP-Codes. If one check fails, the session won't be created. You can also define challenges e.g. an Email-OTP or SMS-OTP. Then, the Zitadel-API will send back the code.

Definition at line 13 of file Update.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( array $settings)

Initialize the Session create setup

Parameters
$settingsarray The settings array

Definition at line 24 of file Update.php.

Member Function Documentation

◆ getEmailCode()

getEmailCode ( )

Returns the Email-OTP-Code. Works only, if you used the function returnEmailCode() before.

Returns
string The Email-OTP-Code

Definition at line 126 of file Update.php.

◆ getSmsCode()

getSmsCode ( )

Returns the SMS-OTP-Code. Works only, if you used the function returnSmsCode() before.

Returns
string The SMS-OTP-Code

Definition at line 119 of file Update.php.

◆ returnEmailCode()

returnEmailCode ( )

Set the challenge "Email-OTP".

Returns
void

Definition at line 104 of file Update.php.

◆ returnSmsCode()

returnSmsCode ( )

Set the challenge "SMS-OTP".

Returns
void

Definition at line 97 of file Update.php.

◆ setIdpIntentId()

setIdpIntentId ( string $idpIntentId)

Set the check "External Identity Providers". You also have to set the IDP-Intent-Token. You get the required value from the IDP-class.

Parameters
string$idpIntentIdThe IDP-Intent-ID
Returns
void

Definition at line 57 of file Update.php.

◆ setIdpIntentToken()

setIdpIntentToken ( string $idpIntentToken)

Set the check "External Identity Providers". You also have to set the IDP-Intent-ID. You get the required value from the IDP-class.

Parameters
string$idpIntentTokenThe IDP-Intent-Token
Returns
void

Definition at line 66 of file Update.php.

◆ setLifetime()

setLifetime ( int $seconds)

Set the session lifetime

Parameters
int$secondsDuration in Seconds after which the session will be automatically invalidated
Returns
void

Definition at line 112 of file Update.php.

◆ setOtpEmail()

setOtpEmail ( string $otpEmail)

Set the check "Email-OTP".

Parameters
string$otpEmailThe Email-Code
Returns
void

Definition at line 90 of file Update.php.

◆ setPassword()

setPassword ( string $password)

Set the check "password".

Parameters
string$passwordThe user password
Returns
void

Definition at line 48 of file Update.php.

◆ setSessionId()

setSessionId ( string $sessionId)

Set the session id (required).

Parameters
string$sessionIdThe session id
Returns
void

Definition at line 32 of file Update.php.

◆ setSessionToken()

setSessionToken ( string $sessionToken)

Set the session token (required).

Parameters
string$sessionTokenThe session token
Returns
void

Definition at line 40 of file Update.php.

◆ setSmsCode()

setSmsCode ( string $smsCode)

Set the check "SMS-OTP".

Parameters
string$smsCodeThe SMS-Code
Returns
void

Definition at line 82 of file Update.php.

◆ setTOTPCode()

setTOTPCode ( string $totpCode)

Set the check "TOTP-Code".

Parameters
string$totpCodeThe TOTP-Code
Returns
void

Definition at line 74 of file Update.php.

◆ update()

update ( )

Updates the session

Returns
void
Exceptions
ExceptionReturns an error, if the communication with Zitadel fails or one of the checks fails.

Definition at line 134 of file Update.php.


The documentation for this class was generated from the following file: