Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Authentication Extensions #426

Open
Spomky opened this issue Jun 22, 2023 · 0 comments
Open

Better Authentication Extensions #426

Spomky opened this issue Jun 22, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Spomky
Copy link
Contributor

Spomky commented Jun 22, 2023

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

}
@Spomky Spomky self-assigned this Jun 22, 2023
@Spomky Spomky added the enhancement New feature or request label Jun 22, 2023
@Spomky Spomky added this to the 4.7.0 milestone Jun 22, 2023
@Spomky Spomky modified the milestones: 4.7.0, 5.0.0 Jul 26, 2023
@Spomky Spomky modified the milestones: 5.0.0, 5.1.0 Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant