net.smartcosmos.security.authentication.direct.DirectLogoutSuccessHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smartcosmos-framework Show documentation
Show all versions of smartcosmos-framework Show documentation
Provides Spring Configuration and Annotations making it easier to develop SMART COSMOS Extensions
The newest version!
package net.smartcosmos.security.authentication.direct;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler;
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
import org.springframework.stereotype.Component;
/**
* Direct logout handler that will return OK rather than redirect to the login page.
*/
@Component
public class DirectLogoutSuccessHandler extends
AbstractAuthenticationTargetUrlRequestHandler implements LogoutSuccessHandler {
@Override
public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response,
Authentication authentication) throws IOException, ServletException {
response.setStatus(HttpServletResponse.SC_OK);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy