summaryrefslogtreecommitdiffstats
path: root/tests/test_ipaserver
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2012-04-13 15:19:32 -0400
committerRob Crittenden <rcritten@redhat.com>2012-04-16 21:53:01 -0400
commit7b515bddbcec2499fb765be311b3d093edcf6db2 (patch)
tree21182538bb6b73cf9ec1452a0fb5ca982876a0ef /tests/test_ipaserver
parent6f7224f252775c01e13c281a83e555b627834ffd (diff)
downloadfreeipa-7b515bddbcec2499fb765be311b3d093edcf6db2.tar.gz
freeipa-7b515bddbcec2499fb765be311b3d093edcf6db2.tar.xz
freeipa-7b515bddbcec2499fb765be311b3d093edcf6db2.zip
Return consistent expiration message for forms-based login
We need to inform users when a forms-based login fails due to the password needing to be reset. Currently there is no way to distinguish a reset case vs an incorrect password. This will bind the user using a simple LDAP bind over ldapi (by default) and if that is successful, check the expiration date against the current time. The UI portion of this that uses this message will come later. https://fedorahosted.org/freeipa/ticket/2608
Diffstat (limited to 'tests/test_ipaserver')
-rw-r--r--tests/test_ipaserver/test_rpcserver.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_ipaserver/test_rpcserver.py b/tests/test_ipaserver/test_rpcserver.py
index 96d4614a1..230eef241 100644
--- a/tests/test_ipaserver/test_rpcserver.py
+++ b/tests/test_ipaserver/test_rpcserver.py
@@ -102,11 +102,12 @@ def test_unauthorized_error():
s = StartResponse()
assert_equal(
- f.unauthorized(None, s, 'unauthorized'),
+ f.unauthorized(None, s, 'unauthorized', 'password-expired'),
[t % dict(message='unauthorized')]
)
assert s.status == '401 Unauthorized'
- assert s.headers == [('Content-Type', 'text/html; charset=utf-8')]
+ assert s.headers == [('Content-Type', 'text/html; charset=utf-8'),
+ ('X-IPA-Rejection-Reason', 'password-expired')]
def test_params_2_args_options():