diff --git a/knox/models.py b/knox/models.py index 32f95ea4..0ee00d98 100644 --- a/knox/models.py +++ b/knox/models.py @@ -17,7 +17,8 @@ def create( self, user, expiry=knox_settings.TOKEN_TTL, - prefix=knox_settings.TOKEN_PREFIX + prefix=knox_settings.TOKEN_PREFIX, + **kwargs ): token = prefix + crypto.create_token_string() digest = crypto.hash_token(token) @@ -25,7 +26,7 @@ def create( expiry = timezone.now() + expiry instance = super(AuthTokenManager, self).create( token_key=token[:CONSTANTS.TOKEN_KEY_LENGTH], digest=digest, - user=user, expiry=expiry) + user=user, expiry=expiry, **kwargs) return instance, token