api.auth module

Module with additional authentication methods for Eonvelope API.

class api.auth.BasicNoMFAuthentication[source]

Bases: BasicAuthentication

Extended Basic authentication to account for MFA.

References

https://github.com/paperless-ngx/paperless-ngx/blob/dev/src/paperless/auth.py#L77

authenticate(request)[source]

Extended to check whether MFA is enabled for the authenticating user.

Return type:

tuple[Any, Any] | None

Parameters:

request (Request)

class api.auth.BasicNoMFScheme(target)[source]

Bases: BasicScheme

Extended Basic auth scheme to account for MFA.

target_class: None | str | Type[object] = 'api.auth.BasicNoMFAuthentication'
get_security_definition(auto_schema)[source]
Return type:

dict[str, str]

Parameters:

auto_schema (AutoSchema)