From eda3676fd0e9c86983a5fb1dca0915efcb42bf18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Wed, 15 Sep 2021 16:11:53 +0200 Subject: [PATCH] Small tweaks --- fastapi_users/authentication/cookie.py | 1 + fastapi_users/authentication/jwt.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fastapi_users/authentication/cookie.py b/fastapi_users/authentication/cookie.py index d8188f1e..430307d7 100644 --- a/fastapi_users/authentication/cookie.py +++ b/fastapi_users/authentication/cookie.py @@ -26,6 +26,7 @@ class CookieAuthentication( :param cookie_domain: Cookie domain. :param cookie_secure: Whether to only send the cookie to the server via SSL request. :param cookie_httponly: Whether to prevent access to the cookie via JavaScript. + :param cookie_samesite: Set the SameSite policy of the cookie. :param name: Name of the backend. It will be used to name the login route. :param token_audience: List of valid audiences for the JWT. """ diff --git a/fastapi_users/authentication/jwt.py b/fastapi_users/authentication/jwt.py index 8b13704a..6d7fd444 100644 --- a/fastapi_users/authentication/jwt.py +++ b/fastapi_users/authentication/jwt.py @@ -31,7 +31,7 @@ class JWTAuthentication( def __init__( self, - secret: str, + secret: SecretType, lifetime_seconds: int, tokenUrl: str = "auth/jwt/login", name: str = "jwt",