Skip to content

Better Authentication Extensions #426

@Spomky

Description

@Spomky

Description

At the moment, the Webauthn\AuthenticationExtension is kind of generic extension object that carries the input and output data.
It could be great to create dedicated objects for known extensions and enhance the way they are loaded.

Example

Example for uvm

final class UvmExtensionInput extends AuthenticationExtension
{
    private function __construct(bool $requested) {
        parent::__construct('uvm', $requested);
    }

    public static function requested(): self
    {
        return new self(true);
    }

    public static function notRequested(): self
    {
        return new self(false);
    }
}

//Usage:

UvmExtensionInput::requested();
final class UvmExtensionOutput extends AuthenticationExtension
{
    /**
     * @return array<string, positive-int>
     */
    public static function entries(): array
    {
        return ...
    }

}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions