class DynamicDnsUpdateService (View source)

Runs a DDNS update: validates and authenticates it, picks the owning zone and syncs the A/AAAA records.

Methods

__construct(DynamicDnsValidationService $validationService, DynamicDnsAuthenticationService $authService, DynamicDnsRepositoryInterface $repository, AuditLoggerInterface|null $auditService = null, string $clientIp = '', Closure|null $requiresApproval = null, ZoneCacheFlusherInterface|null $zoneCacheFlusher = null)

No description

string
processUpdate(DynamicDnsRequest $request)

No description

array
applyForUser(User $user, string $username, HostnameValue $hostname, IpAddressList $ipList, bool $dualstackUpdate, array|null $allowedZoneIds = null, bool $mayRemoveRecords = true)

Apply an update for a user that was already authenticated by the caller (e.g. via API key).

Details

__construct(DynamicDnsValidationService $validationService, DynamicDnsAuthenticationService $authService, DynamicDnsRepositoryInterface $repository, AuditLoggerInterface|null $auditService = null, string $clientIp = '', Closure|null $requiresApproval = null, ZoneCacheFlusherInterface|null $zoneCacheFlusher = null)

No description

Parameters

DynamicDnsValidationService $validationService
DynamicDnsAuthenticationService $authService
DynamicDnsRepositoryInterface $repository
AuditLoggerInterface|null $auditService
string $clientIp

The caller's address, recorded with failed login attempts

Closure|null $requiresApproval

fn(int $userId, int $zoneId): bool, true when the user's changes to the zone go through change requests; omitted, updates are never refused for review

ZoneCacheFlusherInterface|null $zoneCacheFlusher

string processUpdate(DynamicDnsRequest $request)

No description

Parameters

DynamicDnsRequest $request

Return Value

string

array applyForUser(User $user, string $username, HostnameValue $hostname, IpAddressList $ipList, bool $dualstackUpdate, array|null $allowedZoneIds = null, bool $mayRemoveRecords = true)

Apply an update for a user that was already authenticated by the caller (e.g. via API key).

The shared zone-matching and audit-logging logic lives here so any front end can reuse it.

Parameters

User $user
string $username
HostnameValue $hostname
IpAddressList $ipList
bool $dualstackUpdate
array|null $allowedZoneIds

When provided, the resolved zone must be in this list (used to honor an API key's zone scope); null means no additional restriction.

bool $mayRemoveRecords

False refuses (status 'nodelete') a sync that would leave a record type with fewer records than it has now.

Return Value

array