diff --git a/sanic_security/configuration.py b/sanic_security/configuration.py index 5d4afe6..121a675 100644 --- a/sanic_security/configuration.py +++ b/sanic_security/configuration.py @@ -27,6 +27,9 @@ DEFAULT_CONFIG = { "SECRET": "This is a big secret. Shhhhh", "PUBLIC_SECRET": None, + "OAUTH_CLIENT": None, + "OAUTH_SECRET": None, + "OAUTH_REDIRECT": None, "SESSION_SAMESITE": "Strict", "SESSION_SECURE": True, "SESSION_HTTPONLY": True, @@ -54,6 +57,9 @@ class Config(dict): Attributes: SECRET (str): The secret used by the hashing algorithm for generating and signing JWTs. This should be a string unique to your application. Keep it safe. PUBLIC_SECRET (str): The secret used for verifying and decoding JWTs and can be publicly shared. This should be a string unique to your application. + OAUTH_CLIENT (str): The client ID provided by the OAuth provider, this is used to identify the application making the OAuth request. + OAUTH_SECRET (str): The client secret provided by the OAuth provider, this is used in conjunction with the client ID to authenticate the application. + OAUTH_REDIRECT (str): The redirect URI registered with the OAuth provider, This is the URI where the user will be redirected after a successful authentication. SESSION_SAMESITE (str): The SameSite attribute of session cookies. SESSION_SECURE (bool): The Secure attribute of session cookies. SESSION_HTTPONLY (bool): The HttpOnly attribute of session cookies. HIGHLY recommended that you do not turn this off, unless you know what you are doing. @@ -75,6 +81,9 @@ class Config(dict): SECRET: str PUBLIC_SECRET: str + OAUTH_CLIENT: str + OAUTH_SECRET: str + OAUTH_REDIRECT: str SESSION_SAMESITE: str SESSION_SECURE: bool SESSION_HTTPONLY: bool diff --git a/sanic_security/test/tests.py b/sanic_security/test/tests.py index 2055580..dd1fbe2 100644 --- a/sanic_security/test/tests.py +++ b/sanic_security/test/tests.py @@ -89,12 +89,6 @@ def test_invalid_registration(self): assert ( invalid_phone_registration_response.status_code == 400 ), invalid_phone_registration_response.text - invalid_username_registration_response = self.register( - "invalid_user@register.test", "_inVal!d_", False, True - ) - assert ( - invalid_username_registration_response.status_code == 400 - ), invalid_username_registration_response.text too_many_characters_registration_response = self.register( "too_long_user@register.test", "this_username_is_too_long_to_be_registered_with",