Skip to content

Commit

Permalink
Changed behaviour if state is not found in request
Browse files Browse the repository at this point in the history
- state is a recommended but not required parameter
-> set to null if not found
  • Loading branch information
markertp committed Sep 16, 2015
1 parent c42d7c1 commit 7548916
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions oidc_op/src/main/java/rub/nds/oidc/oidc_op/OIDCManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ public static HTTPResponse generateCode(HttpServletRequest servletRequest)
checkIfEmpty(state, "State");
stateInstance = new State(state);
} catch (OIDCMissingArgumentException ex) {
_log.warn(ex.getMessage());
AuthenticationErrorResponse errorResponse
= new AuthenticationErrorResponse(uriInstance, new ErrorObject("invalid_request", ex.getMessage(), 302), null, null);
return errorResponse.toHTTPResponse();
stateInstance = null;
}

client_id = params.get("client_id");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.nimbusds.oauth2.sdk.http.HTTPResponse;
import com.nimbusds.oauth2.sdk.http.ServletUtils;
import java.io.IOException;
import java.net.URISyntaxException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
Expand Down

0 comments on commit 7548916

Please sign in to comment.