fedi-e2ee/pkd-extensions

Extensions for the Public Key Directory software

Maintainers

👁 soatok

Package info

github.com/fedi-e2ee/pkd-extensions-php

pkg:composer/fedi-e2ee/pkd-extensions

Statistics

Installs: 18 181

Dependents: 1

Suggesters: 0

Stars: 1

Open Issues: 0

v0.3.0 2026-01-30 14:52 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

ISC 150a721a53a75ec76ae8d8324b3b9e47f70a3025

extensionsfediversepublic key directorykey transparency

This package is auto-updated.

Last update: 2026-06-29 02:24:57 UTC


README

👁 CI
👁 Psalm
👁 Latest Stable Version
👁 License
👁 Downloads

This library implements the Aux Data Type validations for clients, middleware, and servers.

![NOTE] Additional extensions must be specified here before implemented in this repository.

Installing

composer require fedi-e2ee/pkd-extensions-php

Usage

This exposes Registry class that will come pre-loaded with the extension types defined in this library. To extend it further, simply call:

/** @var \FediE2EE\PKD\Extensions\Registry $registry */
$yourClass = new CustomExtensionType(); 
// ^ must implement \FediE2EE\PKD\Extensions\ExtensionInterface

$registry->addAuxDataType($yourClass, 'optional-alias-to-support-versioning');
$registry->addAuxDataType($yourClass);

To check if a specific Auxiliary Data value conforms to your registered type's expected format, simply call isValid().

if ($yourClass->isValid($userData)) {
 // You can proceed with processing it!
} else {
 // Rejected. You can call getRejectionReason() to find out why.
 throw new CustomException($yourClass->getRejectionReason());
}