Open sophiasong93 opened 4 years ago
According to the logic in the post() method in https://github.com/James1345/django-rest-knox/blob/develop/knox/views.py If a user set the TOKEN_LIMIT_PER_USER, the token must have a expiry timestamp greater than current time.
post()
TOKEN_LIMIT_PER_USER
token = request.user.auth_token_set.filter(expiry__gt=now)
However, there could also be a use case where user want to set a non-expiring token with TOKEN_TTL=None, but also have a token limit with TOKEN_LIMIT_PER_USER=X.
TOKEN_TTL=None
TOKEN_LIMIT_PER_USER=X
Could this be possible?
According to the logic in the
post()
method in https://github.com/James1345/django-rest-knox/blob/develop/knox/views.py If a user set theTOKEN_LIMIT_PER_USER
, the token must have a expiry timestamp greater than current time.However, there could also be a use case where user want to set a non-expiring token with
TOKEN_TTL=None
, but also have a token limit withTOKEN_LIMIT_PER_USER=X
.Could this be possible?