fix verify someone else token
This commit is contained in:
parent
84afaaa56d
commit
7a581e8357
1 changed files with 5 additions and 5 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue