Returning boolean on token validator #272
Labels
closed:stale
Issue or PR has not seen activity recently
feature request
A feature has been asked for or suggested by the community
Hi,
I'm using the token validator of the authentication submodule. It's raising a TokenValidationError if validation failed and returning nothing (so the method returning None by python internals) if validation success.
I'm not sure is it a good idea. If I use this method inside an if condition and assume the token is valid the condition won't work. Because it will return None which is equal to False.
In my opinion, the method should return True when a token is validated. And IMHO it should return False instead of raising an error, but it will be a breaking change. So I'm not sure is it necessary.
The text was updated successfully, but these errors were encountered: