Zitadel PHP API

Password
in package

Class to manage Passwords

Table of Contents

Properties

$request  : array<string|int, mixed>
$settings  : array<string|int, mixed>
$userid  : int
$verifyCode  : string

Methods

__construct()  : mixed
Initialize the Password class
change()  : bool
Change the password
getVerifyCode()  : string
Retrieve the stored verification code.
requestVerifyCode()  : void
Request a verification code for password reset
setCurrentPassword()  : void
Set the current password for the password change
setNewPassword()  : void
Set the new password for the password change
setUserId()  : void
Set the userid
setVerifyCode()  : void
Set the verification code for the password change

Properties

$request

private array<string|int, mixed> $request

$settings

private array<string|int, mixed> $settings

Methods

__construct()

Initialize the Password class

public __construct(mixed $settings) : mixed
Parameters
$settings : mixed

array The settings array

change()

Change the password

public change() : bool
Return values
bool

Returns true on success, false on failure

getVerifyCode()

Retrieve the stored verification code.

public getVerifyCode() : string
Return values
string

The verification code.

requestVerifyCode()

Request a verification code for password reset

public requestVerifyCode() : void
Tags
throws
Exception

Returns an exception with an error code and a message if the communication with Zitadel fails

setCurrentPassword()

Set the current password for the password change

public setCurrentPassword(string $currentPassword) : void
Parameters
$currentPassword : string

Current password

setNewPassword()

Set the new password for the password change

public setNewPassword(string $newPassword, bool $changeRequired) : void
Parameters
$newPassword : string

New password

$changeRequired : bool

Change required flag

setUserId()

Set the userid

public setUserId(mixed $userid) : void
Parameters
$userid : mixed

int User id

setVerifyCode()

Set the verification code for the password change

public setVerifyCode(string $verifyCode) : void
Parameters
$verifyCode : string

Verification code


        
On this page

Search results