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) auth_realm = self.validated_data.get(self.realm_name)
# only 2 special realms can login # only 2 special realms can login
if not auth_realm in ["ungleich-admin", "ungleich-auth" ]: # if not auth_realm in ["ungleich-admin", "ungleich-auth" ]:
logger.error("Auth-realm is neither ungleich-admin " # logger.error("Auth-realm is neither ungleich-admin "
"nor ungleich-auth".format() # "nor ungleich-auth".format()
) # )
raise exceptions.AuthenticationFailed() # raise exceptions.AuthenticationFailed()
logger.debug("auth: [{}]{}@'{}' {} + {})".format( logger.debug("auth: [{}]{}@'{}' {} + {})".format(
self.name_name, auth_name, auth_realm, self.name_name, auth_name, auth_realm,