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

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __construct()

__construct ( array $settings)

Initialize the Session create setup

Parameters
$settingsarray The settings array

Definition at line 25 of file Create.php.

Member Function Documentation

◆ create()

create ( )

Creates the session

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

Definition at line 149 of file Create.php.

◆ 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 141 of file Create.php.

◆ getSessionId()

getSessionId ( )

Returns the session id.

Returns
string The session id

Definition at line 120 of file Create.php.

◆ getSessionToken()

getSessionToken ( )

Returns the session token

Returns
string The session token

Definition at line 127 of file Create.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 134 of file Create.php.

◆ returnEmailCode()

returnEmailCode ( )

Set the challenge "Email-OTP".

Returns
void

Definition at line 105 of file Create.php.

◆ returnSmsCode()

returnSmsCode ( )

Set the challenge "SMS-OTP".

Returns
void

Definition at line 98 of file Create.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 58 of file Create.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 67 of file Create.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 113 of file Create.php.

◆ setLoginName()

setLoginName ( string $loginName)

Set the user identifier "login name". You can't set both user identifiers. This will result in an error.

Parameters
string$loginNameThe 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
Returns
void

Definition at line 41 of file Create.php.

◆ setOtpEmail()

setOtpEmail ( string $otpEmail)

Set the check "Email-OTP".

Parameters
string$otpEmailThe Email-Code
Returns
void

Definition at line 91 of file Create.php.

◆ setPassword()

setPassword ( string $password)

Set the check "password".

Parameters
string$passwordThe user password
Returns
void

Definition at line 49 of file Create.php.

◆ setSmsCode()

setSmsCode ( string $smsCode)

Set the check "SMS-OTP".

Parameters
string$smsCodeThe SMS-Code
Returns
void

Definition at line 83 of file Create.php.

◆ setTOTPCode()

setTOTPCode ( string $totpCode)

Set the check "TOTP-Code".

Parameters
string$totpCodeThe TOTP-Code
Returns
void

Definition at line 75 of file Create.php.

◆ setUserId()

setUserId ( string $userid)

Set the user identifier "id". You can't set both user identifiers. This will result in an error.

Parameters
string$useridUser Id
Returns
void

Definition at line 33 of file Create.php.


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