Skip to content

Better Authentication Extensions #426

Open
@Spomky

Description

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 ...
    }

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions