com.kakawait.spring.security.cas.web.authentication.RequestAwareCasLogoutSuccessHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-security-cas-extension Show documentation
Show all versions of spring-security-cas-extension Show documentation
Spring security cas extension and additional implementation used by the starter
package com.kakawait.spring.security.cas.web.authentication;
import org.springframework.security.cas.ServiceProperties;
import org.springframework.web.util.UriComponentsBuilder;
import java.net.URI;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import static org.springframework.web.servlet.support.ServletUriComponentsBuilder.fromContextPath;
/**
* @author Thibaud Leprêtre
*/
public class RequestAwareCasLogoutSuccessHandler extends CasLogoutSuccessHandler {
public RequestAwareCasLogoutSuccessHandler(URI casLogout, ServiceProperties serviceProperties) {
super(casLogout, serviceProperties);
}
@Override
protected String determineTargetUrl(HttpServletRequest request, HttpServletResponse response) {
UriComponentsBuilder builder = UriComponentsBuilder.fromUri(casLogout);
addLogoutServiceParameter(builder, fromContextPath(request).build().toUriString());
return builder.build().toUriString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy