Skip to content

Commit

Permalink
Merge pull request #488 from lahirue/AuthFramework2
Browse files Browse the repository at this point in the history
IDENTITY-4888 Authentication framework is not properly handle
  • Loading branch information
darshanasbg committed Aug 5, 2016
2 parents fd62979 + d42d999 commit 9140f7c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,27 @@ public void setAuthenticatedReqPathAuthenticator(
AuthenticatorConfig authenticatedReqPathAuthenticator) {
this.authenticatedReqPathAuthenticator = authenticatedReqPathAuthenticator;
}

/**
* This method will clone current class objects
* This method is to solve the issue - multiple requests for same user/SP
*
* @return SequenceConfig object
*/
public SequenceConfig cloneObject() {
SequenceConfig sequenceConfig = new SequenceConfig();
sequenceConfig.setName(this.getName());
sequenceConfig.setForceAuthn(this.isForceAuthn());
sequenceConfig.setCheckAuthn(this.isCheckAuthn());
sequenceConfig.setApplicationId(this.getApplicationId());
sequenceConfig.setStepMap(this.getStepMap());
sequenceConfig.setReqPathAuthenticators(this.getReqPathAuthenticators());
sequenceConfig.setApplicationConfig(this.getApplicationConfig());
sequenceConfig.setCompleted(this.isCompleted());
sequenceConfig.setAuthenticatedUser(this.getAuthenticatedUser());
sequenceConfig.setAuthenticatedIdPs(this.getAuthenticatedIdPs());
sequenceConfig.setAuthenticatedReqPathAuthenticator(this.getAuthenticatedReqPathAuthenticator());
return sequenceConfig;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ protected void findPreviousAuthenticatedSession(HttpServletRequest request,
}

context.setPreviousSessionFound(true);
sequenceConfig = previousAuthenticatedSeq;
sequenceConfig = previousAuthenticatedSeq.cloneObject();
AuthenticatedUser authenticatedUser = sequenceConfig.getAuthenticatedUser();
String authenticatedUserTenantDomain = sequenceConfig.getAuthenticatedUser().getTenantDomain();

Expand Down

0 comments on commit 9140f7c

Please sign in to comment.