Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions 25 toolkit/src/main/java/com/onelogin/saml2/Auth.java
Original file line number Diff line number Diff line change
Expand Up @@ -625,16 +625,23 @@ public String getSLOResponseUrl() {
*
* @param requestId
* The ID of the AuthNRequest sent by this SP to the IdP
* @param currentUrl
* The URL of the current request (defaults to the HttpRequest getCurrentUrl())
*
* @throws Exception
*/
public void processResponse(String requestId) throws Exception {
public void processResponse(String requestId, String currentUrl) throws Exception {
authenticated = false;
final HttpRequest httpRequest = ServletUtils.makeHttpRequest(this.request);
final String samlResponseParameter = httpRequest.getParameter("SAMLResponse");

if (samlResponseParameter != null) {
SamlResponse samlResponse = new SamlResponse(settings, httpRequest);

if( currentUrl != null ){
samlResponse.setDestinationUrl(currentUrl);
}

lastResponse = samlResponse.getSAMLResponseXml();

if (samlResponse.isValid(requestId)) {
Expand Down Expand Up @@ -667,10 +674,22 @@ public void processResponse(String requestId) throws Exception {
/**
* Process the SAML Response sent by the IdP.
*
* @throws Exception
* @param requestId
* The ID of the AuthNRequest sent by this SP to the IdP
*
* @throws Exception
*/
public void processResponse(String requestId) throws Exception {
processResponse(requestId, null);
}

/**
* Process the SAML Response sent by the IdP.
*
* @throws Exception
*/
public void processResponse() throws Exception {
processResponse(null);
processResponse(null, null);
}

/**
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.