Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
kberzinch committed Sep 18, 2024
1 parent 515d805 commit 3f1c99d
Showing 1 changed file with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import java.io.IOException;
import java.io.StringReader;
import java.net.URI;

import org.checkerframework.checker.units.qual.N;
import org.jboss.logging.Logger;
import org.keycloak.broker.provider.AbstractIdentityProvider;
import org.keycloak.broker.provider.AuthenticationRequest;
Expand Down Expand Up @@ -68,15 +66,14 @@ public Response performLogin(final AuthenticationRequest request) {
URI authenticationUrl = createAuthenticationUrl(getConfig(), request).build();

return Response.seeOther(authenticationUrl)
.cookie(
new NewCookie.Builder("__Host-cas_state")
.value(request.getState().getDecodedState())
.httpOnly(true)
.secure(true)
.path("/")
.build()
)
.build();
.cookie(
new NewCookie.Builder("__Host-cas_state")
.value(request.getState().getDecodedState())
.httpOnly(true)
.secure(true)
.path("/")
.build())
.build();
} catch (Exception e) {
throw new IdentityBrokerException(
"Could not send authentication request to cas provider.", e);
Expand Down Expand Up @@ -136,8 +133,7 @@ public static final class Endpoint {
public Response authResponse(
@QueryParam(PROVIDER_PARAMETER_TICKET) final String ticket,
@QueryParam(PROVIDER_PARAMETER_STATE) final String state,
@CookieParam("__Host-cas_state") final Cookie stateCookie
) {
@CookieParam("__Host-cas_state") final Cookie stateCookie) {
logger.warn("cas_state value: " + (String) stateCookie.getValue());
try {
BrokeredIdentityContext federatedIdentity =
Expand Down

0 comments on commit 3f1c99d

Please sign in to comment.