LDAP Account Manager

Ajax
in package

Manages all AJAX requests.

Table of Contents

handleRequest()  : void
Manages an AJAX request.
setHeader()  : void
Sets JSON HTTP header.
buildDnSelectionHtml()  : string
Returns the HTML to build the DN selection list.
checkPassword()  : void
Checks if the given password matches the hash value.
checkPasswordStrength()  : void
Checks if a password is accepted by LAM's password policy.
dnSelection()  : string
Handles DN selection fields.
enforceUserIsLoggedInToMainConfiguration()  : void
Checks if the user entered the configuration master password.
getDefaultDns()  : array<string|int, string>
Returns a list of default DNs from account types + tree suffix.
getSubDns()  : array<string|int, string>
Returns the sub DNs of given DN.
managePasswordChange()  : void
Manages a password change request on the edit account page.
manageWebauthn()  : void
Manages webauthn requests.
manageWebauthnDevices()  : void
Webauthn device management.
manageWebauthnDevicesDelete()  : void
Deletes a webauthn device.
manageWebauthnDevicesSearch()  : void
Searches for webauthn devices and prints the results as html.
manageWebauthnDevicesUpdateName()  : void
Updates a webauthn device name.
manageWebauthnOwnDevices()  : void
Manages requests to setup user's own webauthn devices.
testSmtpConnection()  : void
Checks if the SMTP settings in main config are valid.

Methods

handleRequest()

Manages an AJAX request.

public handleRequest() : void
Return values
void

setHeader()

Sets JSON HTTP header.

public static setHeader() : void
Return values
void

buildDnSelectionHtml()

Returns the HTML to build the DN selection list.

private buildDnSelectionHtml(array<string|int, string> $dnList, string $currentDn) : string
Parameters
$dnList : array<string|int, string>

DN list

$currentDn : string

current DN

Return values
string

HTML code

checkPassword()

Checks if the given password matches the hash value.

private checkPassword() : void
Return values
void

checkPasswordStrength()

Checks if a password is accepted by LAM's password policy.

private checkPasswordStrength(array<string|int, mixed> $input) : void
Parameters
$input : array<string|int, mixed>

input parameters

Return values
void

dnSelection()

Handles DN selection fields.

private dnSelection() : string
Return values
string

JSON output

enforceUserIsLoggedInToMainConfiguration()

Checks if the user entered the configuration master password.

private enforceUserIsLoggedInToMainConfiguration() : void

Dies if password is not set.

Return values
void

getDefaultDns()

Returns a list of default DNs from account types + tree suffix.

private getDefaultDns() : array<string|int, string>
Return values
array<string|int, string>

default DNs

getSubDns()

Returns the sub DNs of given DN.

private getSubDns(string $dn) : array<string|int, string>
Parameters
$dn : string

DN

Return values
array<string|int, string>

sub DNs

managePasswordChange()

Manages a password change request on the edit account page.

private static managePasswordChange(array<string|int, mixed> $input) : void
Parameters
$input : array<string|int, mixed>

input parameters

Return values
void

manageWebauthn()

Manages webauthn requests.

private manageWebauthn(bool $isSelfService) : void
Parameters
$isSelfService : bool

request is from self service

Return values
void

manageWebauthnDevices()

Webauthn device management.

private manageWebauthnDevices() : void
Return values
void

manageWebauthnDevicesDelete()

Deletes a webauthn device.

private manageWebauthnDevicesDelete(string $dn, string $credentialId) : void
Parameters
$dn : string

user DN

$credentialId : string

base64 encoded credential id

Return values
void

manageWebauthnDevicesSearch()

Searches for webauthn devices and prints the results as html.

private manageWebauthnDevicesSearch(string $searchTerm) : void
Parameters
$searchTerm : string

search term

Return values
void

manageWebauthnDevicesUpdateName()

Updates a webauthn device name.

private manageWebauthnDevicesUpdateName(string $dn, string $credentialId, string $name) : void
Parameters
$dn : string

user DN

$credentialId : string

base64 encoded credential id

$name : string

name

Return values
void

manageWebauthnOwnDevices()

Manages requests to setup user's own webauthn devices.

private manageWebauthnOwnDevices() : void
Return values
void

testSmtpConnection()

Checks if the SMTP settings in main config are valid.

private testSmtpConnection() : void
Return values
void

Search results