Zitadel PHP Client 1.3.6 PHP Client for Zitadel

Loading...
Searching...
No Matches
Public Member Functions
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

  $settings | array 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 | $idpIntentId | The 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 | $idpIntentToken | The IDP-Intent-Token

Returns
  void

Definition at line 66 of file Update.php.

## ◆ setLifetime()

setLifetime | ( | int | $seconds | ) |

Set the session lifetime

Parameters

  int | $seconds | Duration 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 | $otpEmail | The Email-Code

Returns
  void

Definition at line 90 of file Update.php.

## ◆ setPassword()

setPassword | ( | string | $password | ) |

Set the check "password".

Parameters

  string | $password | The user password

Returns
  void

Definition at line 48 of file Update.php.

## ◆ setSessionId()

setSessionId | ( | string | $sessionId | ) |

Set the session id (required).

Parameters

  string | $sessionId | The session id

Returns
  void

Definition at line 32 of file Update.php.

## ◆ setSessionToken()

setSessionToken | ( | string | $sessionToken | ) |

Set the session token (required).

Parameters

  string | $sessionToken | The session token

Returns
  void

Definition at line 40 of file Update.php.

## ◆ setSmsCode()

setSmsCode | ( | string | $smsCode | ) |

Set the check "SMS-OTP".

Parameters

  string | $smsCode | The SMS-Code

Returns
  void

Definition at line 82 of file Update.php.

## ◆ setTOTPCode()

setTOTPCode | ( | string | $totpCode | ) |

Set the check "TOTP-Code".

Parameters

  string | $totpCode | The TOTP-Code

Returns
  void

Definition at line 74 of file Update.php.

## ◆ update()

update | ( |  | ) |

Updates the session

Returns
  void

Exceptions

  Exception | Returns 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:

- src/Session/Update.php