Zitadel PHP Client 1.3.6
PHP Client for Zitadel
|
Public Member Functions | |
__construct (array $settings) | |
setUserId (string $userid) | |
setLoginName (string $loginName) | |
setPassword (string $password) | |
setIdpIntentId (string $idpIntentId) | |
setIdpIntentToken (string $idpIntentToken) | |
setTOTPCode (string $totpCode) | |
setSmsCode (string $smsCode) | |
setOtpEmail (string $otpEmail) | |
returnSmsCode () | |
returnEmailCode () | |
setLifetime (int $seconds) | |
getSessionId () | |
getSessionToken () | |
getSmsCode () | |
getEmailCode () | |
create () | |
At the end, you get a token, which is required for further updates of this session. First, you have to set a user identifier. This can either be the user id or the login name. 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 Create.php.
__construct | ( | array | $settings | ) |
Initialize the Session create setup
$settings | array The settings array |
Definition at line 25 of file Create.php.
create | ( | ) |
Creates the session
Exception | Returns an error, if the communication with Zitadel fails or one of the checks fails. |
Definition at line 149 of file Create.php.
getEmailCode | ( | ) |
Returns the Email-OTP-Code. Works only, if you used the function returnEmailCode() before.
Definition at line 141 of file Create.php.
getSessionId | ( | ) |
getSessionToken | ( | ) |
Returns the session token
Definition at line 127 of file Create.php.
getSmsCode | ( | ) |
Returns the SMS-OTP-Code. Works only, if you used the function returnSmsCode() before.
Definition at line 134 of file Create.php.
returnEmailCode | ( | ) |
returnSmsCode | ( | ) |
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.
string | $idpIntentId | The IDP-Intent-ID |
Definition at line 58 of file Create.php.
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.
string | $idpIntentToken | The IDP-Intent-Token |
Definition at line 67 of file Create.php.
setLifetime | ( | int | $seconds | ) |
Set the session lifetime
int | $seconds | Duration in Seconds after which the session will be automatically invalidated |
Definition at line 113 of file Create.php.
setLoginName | ( | string | $loginName | ) |
Set the user identifier "login name". You can't set both user identifiers. This will result in an error.
string | $loginName | The login name e.g. doe@y.nosp@m.our-.nosp@m.zitad.nosp@m.el-i.nosp@m.nstan.nosp@m.ce.c.nosp@m.om |
Definition at line 41 of file Create.php.
setOtpEmail | ( | string | $otpEmail | ) |
Set the check "Email-OTP".
string | $otpEmail | The Email-Code |
Definition at line 91 of file Create.php.
setPassword | ( | string | $password | ) |
Set the check "password".
string | $password | The user password |
Definition at line 49 of file Create.php.
setSmsCode | ( | string | $smsCode | ) |
Set the check "SMS-OTP".
string | $smsCode | The SMS-Code |
Definition at line 83 of file Create.php.
setTOTPCode | ( | string | $totpCode | ) |
Set the check "TOTP-Code".
string | $totpCode | The TOTP-Code |
Definition at line 75 of file Create.php.
setUserId | ( | string | $userid | ) |
Set the user identifier "id". You can't set both user identifiers. This will result in an error.
string | $userid | User Id |
Definition at line 33 of file Create.php.