Commit cbb2f2f8 authored by Erlend Hamnaberg's avatar Erlend Hamnaberg Committed by Doccrazy

Redirect to application after login is complete

parent 89e3d757
......@@ -141,13 +141,14 @@ public class CASLoginProtocol implements LoginProtocol {
event.event(EventType.LOGOUT);
event.user(userSession.getUser()).session(userSession).success();
LoginFormsProvider infoPage = session.getProvider(LoginFormsProvider.class).setSuccess("Logout successful");
if (redirectUri != null) {
infoPage.setAttribute("pageRedirectUri", redirectUri);
return Response.status(302).location(URI.create(redirectUri)).build();
} else {
LoginFormsProvider infoPage = session.getProvider(LoginFormsProvider.class).setSuccess("Logout successful");
infoPage.setAttribute("skipLink", true);
return infoPage.createInfoPage();
}
return infoPage.createInfoPage();
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment