File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -997,6 +997,10 @@ def authn_info(self):
997
997
res = []
998
998
for astat in self .assertion .authn_statement :
999
999
context = astat .authn_context
1000
+ try :
1001
+ authn_instant = astat .authn_instant
1002
+ except AttributeError :
1003
+ authn_instant = ""
1000
1004
if context :
1001
1005
try :
1002
1006
aclass = context .authn_context_class_ref .text
@@ -1007,7 +1011,7 @@ def authn_info(self):
1007
1011
context .authenticating_authority ]
1008
1012
except AttributeError :
1009
1013
authn_auth = []
1010
- res .append ((aclass , authn_auth ))
1014
+ res .append ((aclass , authn_auth , authn_instant ))
1011
1015
return res
1012
1016
1013
1017
def authz_decision_info (self ):
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
# -*- coding: utf-8 -*-
3
3
from contextlib import closing
4
+ from datetime import datetime
5
+ from dateutil import parser
4
6
from saml2 .authn_context import INTERNETPROTOCOLPASSWORD
5
7
6
8
from saml2 .server import Server
@@ -123,6 +125,9 @@ def test_verify_w_authn(self):
123
125
assert len (authn_info ) == 1
124
126
assert authn_info [0 ][0 ] == INTERNETPROTOCOLPASSWORD
125
127
assert authn_info [0 ][1 ] == ["http://www.example.com/login" ]
128
+ now = datetime .now ()
129
+ dt = parser .parse (authn_info [0 ][2 ])
130
+ assert now .year == dt .year and now .month == dt .month and now .day == dt .day
126
131
session_info = self .ar .session_info ()
127
132
assert session_info ["authn_info" ] == authn_info
128
133
You can’t perform that action at this time.
0 commit comments