File tree 3 files changed +10
-3
lines changed
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 4
4
5
5
from uuid import uuid4
6
6
7
+ import six
7
8
from django .conf import settings
8
9
from django .contrib import messages
9
10
from django .core .urlresolvers import reverse
@@ -637,8 +638,8 @@ def finish_pipeline(self):
637
638
638
639
try :
639
640
identity = self .provider .build_identity (data )
640
- except IdentityNotValid :
641
- return self .error (ERR_INVALID_IDENTITY )
641
+ except IdentityNotValid as error :
642
+ return self .error (six . text_type ( error ) or ERR_INVALID_IDENTITY )
642
643
643
644
if self .state .flow == self .FLOW_LOGIN :
644
645
# create identity and authenticate the user
Original file line number Diff line number Diff line change @@ -299,7 +299,12 @@ def build_identity(self, state):
299
299
300
300
# Email and identifier MUST be correctly mapped
301
301
if not attributes [Attributes .IDENTIFIER ] or not attributes [Attributes .USER_EMAIL ]:
302
- raise IdentityNotValid
302
+ raise IdentityNotValid (
303
+ _ (
304
+ "Failed to map SAML attributes. Assertion returned the following attribute keys: %(keys)s"
305
+ )
306
+ % {"keys" : raw_attributes .keys ()}
307
+ )
303
308
304
309
name = (attributes [k ] for k in (Attributes .FIRST_NAME , Attributes .LAST_NAME ))
305
310
name = " " .join (filter (None , name ))
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ class App extends React.Component {
114
114
AlertActions . addAlert ( {
115
115
message : msg . message ,
116
116
type : msg . level ,
117
+ neverExpire : true ,
117
118
} ) ;
118
119
} ) ;
119
120
You can’t perform that action at this time.
0 commit comments