From 9467de6a986d71fd7ac4e4cf4223f170bd1ae27a Mon Sep 17 00:00:00 2001 From: Chris Wagner Date: Wed, 29 Jan 2025 09:31:21 -0800 Subject: [PATCH] New year, new Black (#1068) --- .pre-commit-config.yaml | 2 +- flask_security/__init__.py | 14 ++++---- flask_security/babel.py | 14 ++++---- flask_security/change_email.py | 20 ++++++------ flask_security/change_username.py | 34 +++++++++---------- flask_security/changeable.py | 14 ++++---- flask_security/cli.py | 12 +++---- flask_security/confirmable.py | 14 ++++---- flask_security/core.py | 16 ++++----- flask_security/datastore.py | 12 +++---- flask_security/decorators.py | 12 +++---- flask_security/forms.py | 14 ++++---- flask_security/json.py | 8 ++--- flask_security/mail_util.py | 14 ++++---- flask_security/models/__init__.py | 2 +- flask_security/oauth_glue.py | 10 +++--- flask_security/oauth_provider.py | 12 +++---- flask_security/password_util.py | 10 +++--- flask_security/passwordless.py | 12 +++---- flask_security/phone_util.py | 12 +++---- flask_security/quart_compat.py | 14 ++++---- flask_security/recoverable.py | 12 +++---- flask_security/recovery_codes.py | 10 +++--- flask_security/registerable.py | 12 +++---- flask_security/signals.py | 12 +++---- flask_security/tf_plugin.py | 14 ++++---- flask_security/totp.py | 10 +++--- flask_security/twofactor.py | 10 +++--- flask_security/unified_signin.py | 54 +++++++++++++++---------------- flask_security/username_util.py | 10 +++--- flask_security/utils.py | 12 +++---- flask_security/views.py | 52 ++++++++++++++--------------- flask_security/webauthn.py | 52 ++++++++++++++--------------- flask_security/webauthn_util.py | 10 +++--- tests/conftest.py | 12 +++---- tests/test_async.py | 14 ++++---- tests/test_basic.py | 10 +++--- tests/test_change_email.py | 10 +++--- tests/test_change_username.py | 10 +++--- tests/test_changeable.py | 10 +++--- tests/test_cli.py | 6 ++-- tests/test_configuration.py | 6 ++-- tests/test_confirmable.py | 6 ++-- tests/test_context_processors.py | 6 ++-- tests/test_csrf.py | 10 +++--- tests/test_datastore.py | 12 +++---- tests/test_entities.py | 6 ++-- tests/test_hashing.py | 10 +++--- tests/test_misc.py | 12 +++---- tests/test_oauthglue.py | 10 +++--- tests/test_passwordless.py | 6 ++-- tests/test_recoverable.py | 10 +++--- tests/test_recovery_codes.py | 10 +++--- tests/test_registerable.py | 6 ++-- tests/test_response.py | 10 +++--- tests/test_templates.py | 16 ++++----- tests/test_tf_plugin.py | 10 +++--- tests/test_trackable.py | 6 ++-- tests/test_two_factor.py | 10 +++--- tests/test_unified_signin.py | 10 +++--- tests/test_utils.py | 10 +++--- tests/test_webauthn.py | 10 +++--- 62 files changed, 403 insertions(+), 403 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 50ccf192..0c92409a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - id: pyupgrade args: [--py39-plus] - repo: https://github.com/psf/black - rev: 24.10.0 + rev: 25.1.0 hooks: - id: black - repo: https://github.com/pycqa/flake8 diff --git a/flask_security/__init__.py b/flask_security/__init__.py index 9514dda3..e208fb52 100644 --- a/flask_security/__init__.py +++ b/flask_security/__init__.py @@ -1,13 +1,13 @@ """ - flask_security - ~~~~~~~~~~~~~~ +flask_security +~~~~~~~~~~~~~~ - Flask-Security is a Flask extension that aims to add comprehensive security - to Flask applications. +Flask-Security is a Flask extension that aims to add comprehensive security +to Flask applications. - :copyright: (c) 2012-2019 by Matt Wright. - :copyright: (c) 2019-2025 by J. Christopher Wagner. - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012-2019 by Matt Wright. +:copyright: (c) 2019-2025 by J. Christopher Wagner. +:license: MIT, see LICENSE for more details. """ # flake8: noqa: F401 diff --git a/flask_security/babel.py b/flask_security/babel.py index 4f99e798..a1b18436 100644 --- a/flask_security/babel.py +++ b/flask_security/babel.py @@ -1,14 +1,14 @@ """ - flask_security.babel - ~~~~~~~~~~~~~~~~~~~~ +flask_security.babel +~~~~~~~~~~~~~~~~~~~~ - I18N support for Flask-Security. +I18N support for Flask-Security. - :copyright: (c) 2019-2023 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019-2023 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. - As of Flask-Babel 2.0.0 - it supports the Flask-BabelEx Domain extension - and it - is maintained. If that isn't installed fall back to a Null Domain +As of Flask-Babel 2.0.0 - it supports the Flask-BabelEx Domain extension - and it +is maintained. If that isn't installed fall back to a Null Domain """ # flake8: noqa: F811 diff --git a/flask_security/change_email.py b/flask_security/change_email.py index ccb9e3c1..65d3f23d 100644 --- a/flask_security/change_email.py +++ b/flask_security/change_email.py @@ -1,17 +1,17 @@ """ - flask_security.change_email - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.change_email +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security Change Email module +Flask-Security Change Email module - :copyright: (c) 2024-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2024-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. - Allow user to change their email address. - If CHANGE_EMAIL_CONFIRM is set then the user will receive an email - at the new email address with a token that can be used to verify and change - emails. Upon success - if CHANGE_EMAIL_NOTIFY_OLD is set, an email will be sent - to the old email address. +Allow user to change their email address. +If CHANGE_EMAIL_CONFIRM is set then the user will receive an email +at the new email address with a token that can be used to verify and change +emails. Upon success - if CHANGE_EMAIL_NOTIFY_OLD is set, an email will be sent +to the old email address. """ from __future__ import annotations diff --git a/flask_security/change_username.py b/flask_security/change_username.py index 94f3f5dd..4e2a0c02 100644 --- a/flask_security/change_username.py +++ b/flask_security/change_username.py @@ -1,26 +1,26 @@ """ - flask_security.change_username - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.change_username +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security Change Username module +Flask-Security Change Username module - :copyright: (c) 2025-2025 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2025-2025 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. - Allow user to change their username. - This is really just for when username is used as an authenticating - identity (and therefore has to be unique). +Allow user to change their username. +This is really just for when username is used as an authenticating +identity (and therefore has to be unique). - The basic feature allows an authenticated user to change their username - to any available username. Normalization and validation take place - using username_util. - This doesn't offer any defense against username enumeration by another user or - preventing a user from constantly changing their username. Applications - could use the UsernameUtil.check_username() method to implement this. +The basic feature allows an authenticated user to change their username +to any available username. Normalization and validation take place +using username_util. +This doesn't offer any defense against username enumeration by another user or +preventing a user from constantly changing their username. Applications +could use the UsernameUtil.check_username() method to implement this. - Think about: username is normally considered 'public' however as an identity - should we follow a change protocol more like email - require a confirmation from - the registered email. +Think about: username is normally considered 'public' however as an identity +should we follow a change protocol more like email - require a confirmation from +the registered email. """ diff --git a/flask_security/changeable.py b/flask_security/changeable.py index 145254f7..98b355b3 100644 --- a/flask_security/changeable.py +++ b/flask_security/changeable.py @@ -1,13 +1,13 @@ """ - flask_security.changeable - ~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.changeable +~~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security change password module +Flask-Security change password module - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :author: Eskil Heyn Olsen - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:author: Eskil Heyn Olsen +:license: MIT, see LICENSE for more details. """ from __future__ import annotations diff --git a/flask_security/cli.py b/flask_security/cli.py index e9431f00..4711955c 100644 --- a/flask_security/cli.py +++ b/flask_security/cli.py @@ -1,12 +1,12 @@ """ - flask_security.cli - ~~~~~~~~~~~~~~~~~~ +flask_security.cli +~~~~~~~~~~~~~~~~~~ - Command Line Interface for managing accounts and roles. +Command Line Interface for managing accounts and roles. - :copyright: (c) 2016 by CERN. - :copyright: (c) 2019-2024 by J. Christopher Wagner - :license: MIT, see LICENSE for more details. +:copyright: (c) 2016 by CERN. +:copyright: (c) 2019-2024 by J. Christopher Wagner +:license: MIT, see LICENSE for more details. """ import functools diff --git a/flask_security/confirmable.py b/flask_security/confirmable.py index ae5436ce..16b4bfb6 100644 --- a/flask_security/confirmable.py +++ b/flask_security/confirmable.py @@ -1,13 +1,13 @@ """ - flask_security.confirmable - ~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.confirmable +~~~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security confirmable module +Flask-Security confirmable module - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2017 by CERN. - :copyright: (c) 2021-2023 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2017 by CERN. +:copyright: (c) 2021-2023 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from flask import current_app diff --git a/flask_security/core.py b/flask_security/core.py index c7418ea2..a41fa4ae 100644 --- a/flask_security/core.py +++ b/flask_security/core.py @@ -1,14 +1,14 @@ """ - flask_security.core - ~~~~~~~~~~~~~~~~~~~ +flask_security.core +~~~~~~~~~~~~~~~~~~~ - Flask-Security core module +Flask-Security core module - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2017 by CERN. - :copyright: (c) 2017 by ETH Zurich, Swiss Data Science Center. - :copyright: (c) 2019-2025 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2017 by CERN. +:copyright: (c) 2017 by ETH Zurich, Swiss Data Science Center. +:copyright: (c) 2019-2025 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from __future__ import annotations diff --git a/flask_security/datastore.py b/flask_security/datastore.py index d8e59030..a27dea1f 100644 --- a/flask_security/datastore.py +++ b/flask_security/datastore.py @@ -1,12 +1,12 @@ """ - flask_security.datastore - ~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.datastore +~~~~~~~~~~~~~~~~~~~~~~~~ - This module contains an user datastore classes. +This module contains an user datastore classes. - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from __future__ import annotations diff --git a/flask_security/decorators.py b/flask_security/decorators.py index 0048e578..8071a8f1 100644 --- a/flask_security/decorators.py +++ b/flask_security/decorators.py @@ -1,12 +1,12 @@ """ - flask_security.decorators - ~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.decorators +~~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security decorators module +Flask-Security decorators module - :copyright: (c) 2012-2019 by Matt Wright. - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012-2019 by Matt Wright. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from __future__ import annotations diff --git a/flask_security/forms.py b/flask_security/forms.py index b71ab51a..3c48a9b6 100644 --- a/flask_security/forms.py +++ b/flask_security/forms.py @@ -1,13 +1,13 @@ """ - flask_security.forms - ~~~~~~~~~~~~~~~~~~~~ +flask_security.forms +~~~~~~~~~~~~~~~~~~~~ - Flask-Security forms module +Flask-Security forms module - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2017 by CERN. - :copyright: (c) 2019-2025 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2017 by CERN. +:copyright: (c) 2019-2025 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from __future__ import annotations diff --git a/flask_security/json.py b/flask_security/json.py index f44a6114..cae32717 100644 --- a/flask_security/json.py +++ b/flask_security/json.py @@ -1,10 +1,10 @@ """ - Flask-Security JSON extensions. +Flask-Security JSON extensions. - :copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. - Pieces of this code liberally copied from flask-mongoengine. +Pieces of this code liberally copied from flask-mongoengine. """ diff --git a/flask_security/mail_util.py b/flask_security/mail_util.py index e4514f60..c567a390 100644 --- a/flask_security/mail_util.py +++ b/flask_security/mail_util.py @@ -1,14 +1,14 @@ """ - flask_security.mail_util - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.mail_util +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Utility class providing methods for validating, normalizing and sending emails. +Utility class providing methods for validating, normalizing and sending emails. - :copyright: (c) 2020-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2020-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. - While this default implementation uses Flask-Mailman - we want to make sure that - Flask-Mailman isn't REQUIRED (if this implementation isn't used). +While this default implementation uses Flask-Mailman - we want to make sure that +Flask-Mailman isn't REQUIRED (if this implementation isn't used). """ from __future__ import annotations diff --git a/flask_security/models/__init__.py b/flask_security/models/__init__.py index 6951442f..ccdc9641 100644 --- a/flask_security/models/__init__.py +++ b/flask_security/models/__init__.py @@ -1,4 +1,4 @@ -"""" +""" Copyright 2019 by J. Christopher Wagner (jwag). All rights reserved. :license: MIT, see LICENSE for more details. diff --git a/flask_security/oauth_glue.py b/flask_security/oauth_glue.py index 20ec2298..43cccd67 100644 --- a/flask_security/oauth_glue.py +++ b/flask_security/oauth_glue.py @@ -1,11 +1,11 @@ """ - flask_security.oauth_glue - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.oauth_glue +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Class and methods to glue our login path with authlib for to support 'social' auth. +Class and methods to glue our login path with authlib for to support 'social' auth. - :copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ diff --git a/flask_security/oauth_provider.py b/flask_security/oauth_provider.py index e33aaed8..5ee9b05d 100644 --- a/flask_security/oauth_provider.py +++ b/flask_security/oauth_provider.py @@ -1,12 +1,12 @@ """ - flask_security.oauth_provider - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.oauth_provider +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Class and methods to create providers for oauth_glue. - Example providers for github and google. +Class and methods to create providers for oauth_glue. +Example providers for github and google. - :copyright: (c) 2024-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2024-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ diff --git a/flask_security/password_util.py b/flask_security/password_util.py index c4b36934..d12ffe5d 100644 --- a/flask_security/password_util.py +++ b/flask_security/password_util.py @@ -1,11 +1,11 @@ """ - flask_security.password_util - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.password_util +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Utility class providing methods for validating and normalizing passwords. +Utility class providing methods for validating and normalizing passwords. - :copyright: (c) 2020-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2020-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ diff --git a/flask_security/passwordless.py b/flask_security/passwordless.py index 447c4494..cd234082 100644 --- a/flask_security/passwordless.py +++ b/flask_security/passwordless.py @@ -1,12 +1,12 @@ """ - flask_security.passwordless - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.passwordless +~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security passwordless module +Flask-Security passwordless module - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2021 by Chris Wagner. - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2021 by Chris Wagner. +:license: MIT, see LICENSE for more details. """ from flask import current_app as app diff --git a/flask_security/phone_util.py b/flask_security/phone_util.py index ec9aec13..afb005fd 100644 --- a/flask_security/phone_util.py +++ b/flask_security/phone_util.py @@ -1,13 +1,13 @@ """ - flask_security.phone_util - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.phone_util +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Utility class for managing phone numbers +Utility class for managing phone numbers - :copyright: (c) 2020-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2020-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. - Avoid making 'phonenumbers' a required package unless needed. +Avoid making 'phonenumbers' a required package unless needed. """ from __future__ import annotations diff --git a/flask_security/quart_compat.py b/flask_security/quart_compat.py index 7f90c371..eecdc7c1 100644 --- a/flask_security/quart_compat.py +++ b/flask_security/quart_compat.py @@ -1,14 +1,14 @@ """ - flask_security.quart_compat - ~~~~~~~~~~~~~~~~~~~~ +flask_security.quart_compat +~~~~~~~~~~~~~~~~~~~~ - Flask-Security quart compatibility modiles +Flask-Security quart compatibility modiles - :copyright: (c) 2019 by Shinon. - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019 by Shinon. +:license: MIT, see LICENSE for more details. - This modules tests whether we are using quart or not - we can test if the name of the imported flask is: quart.flask_patch +This modules tests whether we are using quart or not +we can test if the name of the imported flask is: quart.flask_patch """ import flask diff --git a/flask_security/recoverable.py b/flask_security/recoverable.py index fefeec36..b15c6402 100644 --- a/flask_security/recoverable.py +++ b/flask_security/recoverable.py @@ -1,12 +1,12 @@ """ - flask_security.recoverable - ~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.recoverable +~~~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security recoverable module +Flask-Security recoverable module - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2019-2023 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2019-2023 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from flask import current_app diff --git a/flask_security/recovery_codes.py b/flask_security/recovery_codes.py index 56cf0583..954369f0 100644 --- a/flask_security/recovery_codes.py +++ b/flask_security/recovery_codes.py @@ -1,11 +1,11 @@ """ - flask_security.recovery_codes - ~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.recovery_codes +~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security Recovery Codes Module +Flask-Security Recovery Codes Module - :copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from __future__ import annotations diff --git a/flask_security/registerable.py b/flask_security/registerable.py index db4717ea..8ce88a52 100644 --- a/flask_security/registerable.py +++ b/flask_security/registerable.py @@ -1,12 +1,12 @@ """ - flask_security.registerable - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.registerable +~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security registerable module +Flask-Security registerable module - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from __future__ import annotations diff --git a/flask_security/signals.py b/flask_security/signals.py index d20c9349..6e9e5c4d 100644 --- a/flask_security/signals.py +++ b/flask_security/signals.py @@ -1,12 +1,12 @@ """ - flask_security.signals - ~~~~~~~~~~~~~~~~~~~~~~ +flask_security.signals +~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security signals module +Flask-Security signals module - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2019-2025 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2019-2025 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ import blinker diff --git a/flask_security/tf_plugin.py b/flask_security/tf_plugin.py index 364239ff..a8f645c2 100644 --- a/flask_security/tf_plugin.py +++ b/flask_security/tf_plugin.py @@ -1,14 +1,14 @@ """ - flask_security.tf_plugin - ~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.tf_plugin +~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security Two-Factor Plugin Module +Flask-Security Two-Factor Plugin Module - :copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. - TODO: - - add localized callback for select choices. +TODO: + - add localized callback for select choices. """ from __future__ import annotations diff --git a/flask_security/totp.py b/flask_security/totp.py index 84f4d9db..57711db3 100644 --- a/flask_security/totp.py +++ b/flask_security/totp.py @@ -1,11 +1,11 @@ """ - flask_security.totp - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.totp +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security TOTP (Timed-One-Time-Passwords) module +Flask-Security TOTP (Timed-One-Time-Passwords) module - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from __future__ import annotations diff --git a/flask_security/twofactor.py b/flask_security/twofactor.py index 416148ba..74b8f612 100644 --- a/flask_security/twofactor.py +++ b/flask_security/twofactor.py @@ -1,11 +1,11 @@ """ - flask_security.two_factor - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.two_factor +~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security two_factor module +Flask-Security two_factor module - :copyright: (c) 2016 by Gal Stainfeld, at Emedgene - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:copyright: (c) 2016 by Gal Stainfeld, at Emedgene +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). """ from __future__ import annotations diff --git a/flask_security/unified_signin.py b/flask_security/unified_signin.py index 5749e469..32b4eab6 100644 --- a/flask_security/unified_signin.py +++ b/flask_security/unified_signin.py @@ -1,31 +1,31 @@ """ - flask_security.unified_signin - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Flask-Security Unified Signin module - - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. - - This implements a unified sign in endpoint - allowing - authentication via identity and passcode - where identity is configured - via SECURITY_USER_IDENTITY_ATTRIBUTES, and allowable passcodes are - one of US_ENABLED_METHODS. - - Finish up: - - we should be able to add a phone number as part of setup even w/o any METHODS - - i.e. to allow login with any identity (phone) and a password. - - Consider/Questions: - - Allow registering/confirming with just a phone number - this likely would require - a new register/confirm endpoint in order to implement verification. - - Right now ChangePassword won't work - it requires an existing password - so - if the user doesn't have one - can't change it. However ForgotPassword will in - fact allow the user to add a password. Is that sufficient? - - This also means that there is no way to REMOVE your password once it is setup, - although user can register without one. - - separate code validation times for SMS, email, authenticator? - - token versus code versus passcode? Confusing terminology. +flask_security.unified_signin +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Flask-Security Unified Signin module + +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. + +This implements a unified sign in endpoint - allowing +authentication via identity and passcode - where identity is configured +via SECURITY_USER_IDENTITY_ATTRIBUTES, and allowable passcodes are +one of US_ENABLED_METHODS. + +Finish up: +- we should be able to add a phone number as part of setup even w/o any METHODS - + i.e. to allow login with any identity (phone) and a password. + +Consider/Questions: +- Allow registering/confirming with just a phone number - this likely would require + a new register/confirm endpoint in order to implement verification. +- Right now ChangePassword won't work - it requires an existing password - so + if the user doesn't have one - can't change it. However ForgotPassword will in + fact allow the user to add a password. Is that sufficient? +- This also means that there is no way to REMOVE your password once it is setup, + although user can register without one. +- separate code validation times for SMS, email, authenticator? +- token versus code versus passcode? Confusing terminology. """ diff --git a/flask_security/username_util.py b/flask_security/username_util.py index 417c6bf2..93132f63 100644 --- a/flask_security/username_util.py +++ b/flask_security/username_util.py @@ -1,11 +1,11 @@ """ - flask_security.username_util - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.username_util +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Utility class providing methods for validating and normalizing usernames. +Utility class providing methods for validating and normalizing usernames. - :copyright: (c) 2020-2025 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2020-2025 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ diff --git a/flask_security/utils.py b/flask_security/utils.py index c0486c87..b6f14bb4 100644 --- a/flask_security/utils.py +++ b/flask_security/utils.py @@ -1,12 +1,12 @@ """ - flask_security.utils - ~~~~~~~~~~~~~~~~~~~~ +flask_security.utils +~~~~~~~~~~~~~~~~~~~~ - Flask-Security utils module +Flask-Security utils module - :copyright: (c) 2012-2019 by Matt Wright. - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012-2019 by Matt Wright. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from __future__ import annotations diff --git a/flask_security/views.py b/flask_security/views.py index 449cf415..493953e4 100644 --- a/flask_security/views.py +++ b/flask_security/views.py @@ -1,30 +1,30 @@ """ - flask_security.views - ~~~~~~~~~~~~~~~~~~~~ - - Flask-Security views module - - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2019-2025 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. - - CSRF is tricky. By default all our forms have CSRF protection built in via - Flask-WTF. This is regardless of authentication method or whether the request - is Form or JSON based. Form-based 'just works' since when rendering the form - (on GET), the CSRF token is automatically populated. - We want to handle: - - JSON requests where CSRF token is in a header (e.g. X-CSRF-Token) - - Option to skip CSRF when using a token to authenticate (rather than session) - (CSRF_PROTECT_MECHANISMS) - - Option to skip CSRF for 'login'/unauthenticated requests - (CSRF_IGNORE_UNAUTH_ENDPOINTS) - This is complicated by the fact that the only way to disable form CSRF is to - pass in meta={csrf: false} at form instantiation time. - - Be aware that for CSRF to work, caller MUST pass in session cookie. So - for pure API, and no session cookie - there is no way to support CSRF-Login - so app must set CSRF_IGNORE_UNAUTH_ENDPOINTS (or use CSRF/session cookie for logging - in then once they have a token, no need for cookie). +flask_security.views +~~~~~~~~~~~~~~~~~~~~ + +Flask-Security views module + +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2019-2025 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. + +CSRF is tricky. By default all our forms have CSRF protection built in via +Flask-WTF. This is regardless of authentication method or whether the request +is Form or JSON based. Form-based 'just works' since when rendering the form +(on GET), the CSRF token is automatically populated. +We want to handle: + - JSON requests where CSRF token is in a header (e.g. X-CSRF-Token) + - Option to skip CSRF when using a token to authenticate (rather than session) + (CSRF_PROTECT_MECHANISMS) + - Option to skip CSRF for 'login'/unauthenticated requests + (CSRF_IGNORE_UNAUTH_ENDPOINTS) +This is complicated by the fact that the only way to disable form CSRF is to +pass in meta={csrf: false} at form instantiation time. + +Be aware that for CSRF to work, caller MUST pass in session cookie. So +for pure API, and no session cookie - there is no way to support CSRF-Login +so app must set CSRF_IGNORE_UNAUTH_ENDPOINTS (or use CSRF/session cookie for logging +in then once they have a token, no need for cookie). """ diff --git a/flask_security/webauthn.py b/flask_security/webauthn.py index a3767d8c..82b7929c 100644 --- a/flask_security/webauthn.py +++ b/flask_security/webauthn.py @@ -1,38 +1,38 @@ """ - flask_security.webauthn - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.webauthn +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Flask-Security WebAuthn module +Flask-Security WebAuthn module - :copyright: (c) 2021-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2021-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. - This implements support for webauthn/FIDO2 Level 2 using the py_webauthn package. +This implements support for webauthn/FIDO2 Level 2 using the py_webauthn package. - Check out: https://golb.hplar.ch/2019/08/webauthn.html - for some ideas on recovery and adding additional authenticators. +Check out: https://golb.hplar.ch/2019/08/webauthn.html +for some ideas on recovery and adding additional authenticators. - For testing - you can see your YubiKey (or other) resident keys in chrome! - chrome://settings/securityKeys +For testing - you can see your YubiKey (or other) resident keys in chrome! +chrome://settings/securityKeys - Observation: if key isn't resident than Chrome for example won't let you use - it if it isn't part of allowedCredentials - throw error: referencing: - https://www.w3.org/TR/webauthn-2/#sctn-privacy-considerations-client +Observation: if key isn't resident than Chrome for example won't let you use +it if it isn't part of allowedCredentials - throw error: referencing: +https://www.w3.org/TR/webauthn-2/#sctn-privacy-considerations-client - TODO: - - update/add examples to support webauthn - - should we universally add endpoint urls to JSON responses? - - Add a way to order registered credentials so we can return an ordered list - in allowCredentials. - - #sctn-usecase-new-device-registration - allow more than one "first" key - and have them not necessarily be cross-platform.. add form option? +TODO: + - update/add examples to support webauthn + - should we universally add endpoint urls to JSON responses? + - Add a way to order registered credentials so we can return an ordered list + in allowCredentials. + - #sctn-usecase-new-device-registration - allow more than one "first" key + and have them not necessarily be cross-platform.. add form option? - Research: - - should we store things like user verified in 'last use'... - - By insisting on 2FA if user has registered a webauthn - things - get interesting if they try to log in on a different device.... - How would they register a security key for a new device? They would need - some OTHER 2FA? Force them to register a NEW webauthn key? +Research: + - should we store things like user verified in 'last use'... + - By insisting on 2FA if user has registered a webauthn - things + get interesting if they try to log in on a different device.... + How would they register a security key for a new device? They would need + some OTHER 2FA? Force them to register a NEW webauthn key? """ diff --git a/flask_security/webauthn_util.py b/flask_security/webauthn_util.py index cf6d9f6d..25a87ab0 100644 --- a/flask_security/webauthn_util.py +++ b/flask_security/webauthn_util.py @@ -1,11 +1,11 @@ """ - flask_security.webauthn_util - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +flask_security.webauthn_util +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Utility class providing methods controlling various aspects of webauthn. +Utility class providing methods controlling various aspects of webauthn. - :copyright: (c) 2020-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2020-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ diff --git a/tests/conftest.py b/tests/conftest.py index 10c6ad02..1b4440b8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,12 +1,12 @@ """ - conftest - ~~~~~~~~ +conftest +~~~~~~~~ - Test fixtures and what not +Test fixtures and what not - :copyright: (c) 2017 by CERN. - :copyright: (c) 2019-2025 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2017 by CERN. +:copyright: (c) 2019-2025 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from __future__ import annotations diff --git a/tests/test_async.py b/tests/test_async.py index e8008092..d49309b0 100644 --- a/tests/test_async.py +++ b/tests/test_async.py @@ -1,14 +1,14 @@ """ - test_async - ~~~~~~~~~~ +test_async +~~~~~~~~~~ - Tests using Flask async. +Tests using Flask async. - Make sure our decorators allow for async views - Make sure signal receivers can be async +Make sure our decorators allow for async views +Make sure signal receivers can be async - :copyright: (c) 2023-2023 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2023-2023 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ diff --git a/tests/test_basic.py b/tests/test_basic.py index ce6217ac..9ffc55e1 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -1,11 +1,11 @@ """ - test_basic - ~~~~~~~~~~~ +test_basic +~~~~~~~~~~~ - Test common functionality +Test common functionality - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ import base64 diff --git a/tests/test_change_email.py b/tests/test_change_email.py index 6904cd5d..426f633b 100644 --- a/tests/test_change_email.py +++ b/tests/test_change_email.py @@ -1,11 +1,11 @@ """ - test_change_email - ~~~~~~~~~~~~~~~~~ +test_change_email +~~~~~~~~~~~~~~~~~ - Change email functionality tests +Change email functionality tests - :copyright: (c) 2024-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2024-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from contextlib import contextmanager diff --git a/tests/test_change_username.py b/tests/test_change_username.py index d06d47d9..d6f165d6 100644 --- a/tests/test_change_username.py +++ b/tests/test_change_username.py @@ -1,11 +1,11 @@ """ - test_change_username - ~~~~~~~~~~~~~~~~~~~~ +test_change_username +~~~~~~~~~~~~~~~~~~~~ - Change username tests +Change username tests - :copyright: (c) 2025-2025 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2025-2025 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ import pytest diff --git a/tests/test_changeable.py b/tests/test_changeable.py index 94773048..ae36f35c 100644 --- a/tests/test_changeable.py +++ b/tests/test_changeable.py @@ -1,11 +1,11 @@ """ - test_changeable - ~~~~~~~~~~~~~~~ +test_changeable +~~~~~~~~~~~~~~~ - Changeable tests +Changeable tests - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ import base64 diff --git a/tests/test_cli.py b/tests/test_cli.py index f5bf6157..030c3666 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,8 +1,8 @@ """ - test_cli - ~~~~~~~~ +test_cli +~~~~~~~~ - Test command line interface. +Test command line interface. """ from click.testing import CliRunner diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 657549e3..2d8c7897 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -1,8 +1,8 @@ """ - test_configuration - ~~~~~~~~~~~~~~~~~~ +test_configuration +~~~~~~~~~~~~~~~~~~ - Basic configuration tests +Basic configuration tests """ import base64 diff --git a/tests/test_confirmable.py b/tests/test_confirmable.py index 480ffa67..c86a2081 100644 --- a/tests/test_confirmable.py +++ b/tests/test_confirmable.py @@ -1,8 +1,8 @@ """ - test_confirmable - ~~~~~~~~~~~~~~~~ +test_confirmable +~~~~~~~~~~~~~~~~ - Confirmable tests +Confirmable tests """ from datetime import date, timedelta diff --git a/tests/test_context_processors.py b/tests/test_context_processors.py index 07064389..c1089687 100644 --- a/tests/test_context_processors.py +++ b/tests/test_context_processors.py @@ -1,8 +1,8 @@ """ - test_context_processors - ~~~~~~~~~~~~~~~~~~~~~~~ +test_context_processors +~~~~~~~~~~~~~~~~~~~~~~~ - Context processor tests +Context processor tests """ import pytest diff --git a/tests/test_csrf.py b/tests/test_csrf.py index 8fbf1791..33d89eb7 100644 --- a/tests/test_csrf.py +++ b/tests/test_csrf.py @@ -1,11 +1,11 @@ """ - test_csrf - ~~~~~~~~~~~~~~~~~ +test_csrf +~~~~~~~~~~~~~~~~~ - CSRF tests +CSRF tests - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from contextlib import contextmanager diff --git a/tests/test_datastore.py b/tests/test_datastore.py index c999f984..df40b0fa 100644 --- a/tests/test_datastore.py +++ b/tests/test_datastore.py @@ -1,12 +1,12 @@ """ - test_datastore - ~~~~~~~~~~~~~~ +test_datastore +~~~~~~~~~~~~~~ - Datastore tests +Datastore tests - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ import pytest diff --git a/tests/test_entities.py b/tests/test_entities.py index 3b55b09d..bfedf031 100644 --- a/tests/test_entities.py +++ b/tests/test_entities.py @@ -1,8 +1,8 @@ """ - test_entities - ~~~~~~~~~~~~~ +test_entities +~~~~~~~~~~~~~ - Entity tests +Entity tests """ import inspect diff --git a/tests/test_hashing.py b/tests/test_hashing.py index abbabbb4..18b6cec6 100644 --- a/tests/test_hashing.py +++ b/tests/test_hashing.py @@ -1,11 +1,11 @@ """ - test_hashing - ~~~~~~~~~~~~ +test_hashing +~~~~~~~~~~~~ - hashing tests +hashing tests - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ import timeit diff --git a/tests/test_misc.py b/tests/test_misc.py index 6dfeb18f..e4759c4c 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -1,12 +1,12 @@ """ - test_misc - ~~~~~~~~~~~ +test_misc +~~~~~~~~~~~ - Lots of tests +Lots of tests - :copyright: (c) 2012 by Matt Wright. - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2012 by Matt Wright. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from datetime import timedelta diff --git a/tests/test_oauthglue.py b/tests/test_oauthglue.py index 2501e63d..07722585 100644 --- a/tests/test_oauthglue.py +++ b/tests/test_oauthglue.py @@ -1,11 +1,11 @@ """ - test_oauthglue.py - ~~~~~~~~~~~~~~~~~ +test_oauthglue.py +~~~~~~~~~~~~~~~~~ - Oauth glue tests - oauthglue is a very thin shim between FS and authlib +Oauth glue tests - oauthglue is a very thin shim between FS and authlib - :copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ import pytest diff --git a/tests/test_passwordless.py b/tests/test_passwordless.py index 4625edeb..30dfda36 100644 --- a/tests/test_passwordless.py +++ b/tests/test_passwordless.py @@ -1,8 +1,8 @@ """ - test_passwordless - ~~~~~~~~~~~~~~~~~ +test_passwordless +~~~~~~~~~~~~~~~~~ - Passwordless tests +Passwordless tests """ from datetime import date, timedelta diff --git a/tests/test_recoverable.py b/tests/test_recoverable.py index 2e9fea95..fb33a54c 100644 --- a/tests/test_recoverable.py +++ b/tests/test_recoverable.py @@ -1,11 +1,11 @@ """ - test_recoverable - ~~~~~~~~~~~~~~~~ +test_recoverable +~~~~~~~~~~~~~~~~ - Recoverable functionality tests +Recoverable functionality tests - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from datetime import date, timedelta diff --git a/tests/test_recovery_codes.py b/tests/test_recovery_codes.py index 39e65ca9..b97bd0f1 100644 --- a/tests/test_recovery_codes.py +++ b/tests/test_recovery_codes.py @@ -1,11 +1,11 @@ """ - test_recovery_codes - ~~~~~~~~~~~~~~~~~ +test_recovery_codes +~~~~~~~~~~~~~~~~~ - recovery code tests +recovery code tests - :copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2022-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ import re diff --git a/tests/test_registerable.py b/tests/test_registerable.py index 4d6127ca..0ee11201 100644 --- a/tests/test_registerable.py +++ b/tests/test_registerable.py @@ -1,8 +1,8 @@ """ - test_registerable - ~~~~~~~~~~~~~~~~~ +test_registerable +~~~~~~~~~~~~~~~~~ - Registerable tests +Registerable tests """ import pytest diff --git a/tests/test_response.py b/tests/test_response.py index ed42951e..9fe65923 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -1,11 +1,11 @@ """ - test_response - ~~~~~~~~~~~~~~~~~ +test_response +~~~~~~~~~~~~~~~~~ - Tests for validating default and plugable responses. +Tests for validating default and plugable responses. - :copyright: (c) 2019-2020 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019-2020 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ import pytest diff --git a/tests/test_templates.py b/tests/test_templates.py index 851f0b42..f7d39151 100644 --- a/tests/test_templates.py +++ b/tests/test_templates.py @@ -1,16 +1,16 @@ """ - test_templates - ~~~~~~~~~~ +test_templates +~~~~~~~~~~ - Test templates to be W3C valid +Test templates to be W3C valid - :copyright: (c) 2025-2025 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2025-2025 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. - Note that the validator definitely rate-limits us - so we don't just run - them all. +Note that the validator definitely rate-limits us - so we don't just run +them all. - To run a test pass templates="RESET,LOGIN" on the command line. +To run a test pass templates="RESET,LOGIN" on the command line. """ from time import sleep diff --git a/tests/test_tf_plugin.py b/tests/test_tf_plugin.py index 0043b8ac..4e407157 100644 --- a/tests/test_tf_plugin.py +++ b/tests/test_tf_plugin.py @@ -1,11 +1,11 @@ """ - test_tf_plugin - ~~~~~~~~~~~~~~~~~ +test_tf_plugin +~~~~~~~~~~~~~~~~~ - tf_plugin tests +tf_plugin tests - :copyright: (c) 2022-2022 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2022-2022 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ import json diff --git a/tests/test_trackable.py b/tests/test_trackable.py index 67af7bfc..f0c84d8b 100644 --- a/tests/test_trackable.py +++ b/tests/test_trackable.py @@ -1,8 +1,8 @@ """ - test_trackable - ~~~~~~~~~~~~~~ +test_trackable +~~~~~~~~~~~~~~ - Trackable tests +Trackable tests """ import datetime diff --git a/tests/test_two_factor.py b/tests/test_two_factor.py index 3f47ffb8..402278bf 100644 --- a/tests/test_two_factor.py +++ b/tests/test_two_factor.py @@ -1,11 +1,11 @@ """ - test_two_factor - ~~~~~~~~~~~~~~~~~ +test_two_factor +~~~~~~~~~~~~~~~~~ - two_factor tests +two_factor tests - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from datetime import date, timedelta diff --git a/tests/test_unified_signin.py b/tests/test_unified_signin.py index a699cb3f..53c3ed00 100644 --- a/tests/test_unified_signin.py +++ b/tests/test_unified_signin.py @@ -1,11 +1,11 @@ """ - test_unified_signin - ~~~~~~~~~~~~~~~~~~~ +test_unified_signin +~~~~~~~~~~~~~~~~~~~ - Unified signin tests +Unified signin tests - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ diff --git a/tests/test_utils.py b/tests/test_utils.py index 3225ab30..e20beb45 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,11 +1,11 @@ """ - test_utils - ~~~~~~~~~~ +test_utils +~~~~~~~~~~ - Test utils +Test utils - :copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """ from __future__ import annotations diff --git a/tests/test_webauthn.py b/tests/test_webauthn.py index dc9cc87c..6291c1a8 100644 --- a/tests/test_webauthn.py +++ b/tests/test_webauthn.py @@ -1,11 +1,11 @@ """ - test_webauthn - ~~~~~~~~~~~~~~~~~~~ +test_webauthn +~~~~~~~~~~~~~~~~~~~ - WebAuthn tests +WebAuthn tests - :copyright: (c) 2021-2024 by J. Christopher Wagner (jwag). - :license: MIT, see LICENSE for more details. +:copyright: (c) 2021-2024 by J. Christopher Wagner (jwag). +:license: MIT, see LICENSE for more details. """