Skip to content

Refactor modes to classes which contain the logic of SetMode, possibly other functions #196

@nilsbehlen

Description

@nilsbehlen

This is just an idea:
Make Mode objects which handle the setup logic (SetMode), maybe even the logic of Connect and GetSerialization. This would be easier to extend than the current (bad) approach. So CCredential would call something like PasskeyMode::Setup(this, _pCredProvCredentialEvents).

It is probably also worth checking if some conditions that are currently a combination of Mode and some flag in _config should be their own mode, like if (_config->mode == Mode::SEC_KEY_NO_PIN && _config->usePasskey) could just be Mode::PASSKEY_NO_PIN so that the state is only expressed by Mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions