Skip to content

Commit

Permalink
Try storing state parameter in session
Browse files Browse the repository at this point in the history
  • Loading branch information
kberzinch committed Sep 18, 2024
1 parent 79fdaff commit 55cd969
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public CasIdentityProvider(

@Override
public Response performLogin(final AuthenticationRequest request) {
this.session.setAttribute("cas_state", request.getState());
try {
URI authenticationUrl = createAuthenticationUrl(getConfig(), request).build();
return Response.seeOther(authenticationUrl).build();
Expand Down Expand Up @@ -127,6 +128,7 @@ public static final class Endpoint {
public Response authResponse(
@QueryParam(PROVIDER_PARAMETER_TICKET) final String ticket,
@QueryParam(PROVIDER_PARAMETER_STATE) final String state) {
logger.warn("cas_state value: " + (String) this.session.getAttribute("cas_state"));
try {
BrokeredIdentityContext federatedIdentity =
getFederatedIdentity(config, ticket, session.getContext().getUri(), state);
Expand Down

0 comments on commit 55cd969

Please sign in to comment.