Return BadResponse if shibboleth returns empty SHIB_EPPN
[astakos] / snf-astakos-app / astakos / im / target / shibboleth.py
index 8c88669..c6866d6 100644 (file)
@@ -80,6 +80,8 @@ def login(
     
     try:
         eppn = tokens[Tokens.SHIB_EPPN]
+        if not eppn:
+            raise KeyError
     except KeyError:
         return HttpResponseBadRequest("Missing unique token in request")