Add authenticated user null check before assign to JsClamis attributes
Add authenticated user null check before assign to JsClamis attributes
@@ -87,12 +87,14 @@ public class JsClaims extends AbstractJSContextMemberObject {
public void initializeContext(AuthenticationContext context) {
super.initializeContext(context);
+ if (this.authenticatedUser == null) {
if (StringUtils.isNotBlank(idp) && getContext().getCurrentAuthenticatedIdPs().containsKey(idp)) {
this.authenticatedUser = getContext().getCurrentAuthenticatedIdPs().get(idp).getUser();
} else {
this.authenticatedUser = getAuthenticatedUserFromSubjectIdentifierStep();
}
}
+ }
/**
* Get authenticated user from step config of current subject identifier.
