user.auth.second_factor
¶
Module Contents¶
Classes¶
dict() -> new empty dictionary |
|
Base class and registry for secondary auth factors. |
|
Implements a yubikey factor for the |
Attributes¶
- class user.auth.second_factor.YubikeyConfig[source]¶
Bases:
typing_extensions.TypedDict
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- user.auth.second_factor.SECOND_FACTORS: dict[str, type[SecondFactor]][source]¶
- class user.auth.second_factor.SecondFactor[source]¶
Base class and registry for secondary auth factors.
- abstract classmethod configure(**cfg: Any) Self | None [source]¶
Initialises the auth factor using a dictionary that may or may not contain the configuration values necessary for the auth factor.
If the configuration is invalid None will be returned, otherwise a new instance is created.
All used configuration values should be popped, not just read.
- class user.auth.second_factor.YubikeyFactor(yubikey_client_id: str, yubikey_secret_key: str)[source]¶
Bases:
SecondFactor
Implements a yubikey factor for the
Auth
class.- classmethod configure(**cfg: Any) Self | None [source]¶
Initialises the auth factor using a dictionary that may or may not contain the configuration values necessary for the auth factor.
If the configuration is invalid None will be returned, otherwise a new instance is created.
All used configuration values should be popped, not just read.
- classmethod args_from_app(app: morepath.App) YubikeyConfig [source]¶
Copies the required configuration values from the app, returning a dictionary with all keys present. The values should be either the ones from the application or None.