mirror of
https://github.com/laurivosandi/certidude
synced 2025-09-06 05:41:04 +00:00
api: Better error message when confronted with NTLM
This commit is contained in:
@@ -887,6 +887,10 @@ def test_cli_setup_authority():
|
||||
assert "No Kerberos ticket offered" in r.text, r.text
|
||||
r = requests.get("http://ca.example.lan/api/", headers={"Authorization": "Negotiate blerrgh"})
|
||||
assert r.status_code == 400, r.text
|
||||
assert "Malformed token" in r.text
|
||||
r = requests.get("http://ca.example.lan/api/", headers={"Authorization": "Negotiate TlRMTVNTUAABAAAAl4II4gAAAAAAAAAAAAAAAAAAAAAKADk4AAAADw=="})
|
||||
assert r.status_code == 400, r.text
|
||||
assert "Unsupported authentication mechanism (NTLM" in r.text
|
||||
r = requests.get("http://ca.example.lan/api/", auth=auth)
|
||||
assert r.status_code == 200, r.text
|
||||
|
||||
|
Reference in New Issue
Block a user