All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.luues.security.core.authentication.LogoutSuccessHandler Maven / Gradle / Ivy

package com.luues.security.core.authentication;

import com.luues.security.configuration.core.adapter.WebSecurityConfigurerAdapter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class LogoutSuccessHandler implements org.springframework.security.web.authentication.logout.LogoutSuccessHandler {

    /*@Autowired(required = false)
    private List webSecurityConfigurerAdapterList = new ArrayList<>();
    public LogoutSuccessHandler(List webSecurityConfigurerAdapterList){
        this.webSecurityConfigurerAdapterList.clear();
        webSecurityConfigurerAdapterList.forEach((v) -> this.webSecurityConfigurerAdapterList.add(v));
    }*/

    @Autowired
    private WebSecurityConfigurerAdapter webSecurityConfigurerAdapter;

    @Override
    public void onLogoutSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Authentication authentication) throws IOException, ServletException {
        webSecurityConfigurerAdapter.logoutSuccessHandler(httpServletRequest, httpServletResponse, authentication);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy