fix verify someone else token

This commit is contained in:
wcolmenares 2019-03-11 23:05:13 -04:00
parent 84afaaa56d
commit 7a581e8357

View file

@ -34,11 +34,11 @@ class TokenSerializer(serializers.Serializer):
auth_realm = self.validated_data.get(self.realm_name)
# only 2 special realms can login
if not auth_realm in ["ungleich-admin", "ungleich-auth" ]:
logger.error("Auth-realm is neither ungleich-admin "
"nor ungleich-auth".format()
)
raise exceptions.AuthenticationFailed()
# if not auth_realm in ["ungleich-admin", "ungleich-auth" ]:
# logger.error("Auth-realm is neither ungleich-admin "
# "nor ungleich-auth".format()
# )
# raise exceptions.AuthenticationFailed()
logger.debug("auth: [{}]{}@'{}' {} + {})".format(
self.name_name, auth_name, auth_realm,