mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
26 lines
756 B
Java
26 lines
756 B
Java
package com.commafeed.frontend.servlet;
|
|
|
|
import java.io.IOException;
|
|
|
|
import javax.servlet.ServletException;
|
|
import javax.servlet.http.HttpServlet;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import com.commafeed.CommaFeedConfiguration;
|
|
|
|
@SuppressWarnings("serial")
|
|
@RequiredArgsConstructor
|
|
public class LogoutServlet extends HttpServlet {
|
|
|
|
private final CommaFeedConfiguration config;
|
|
|
|
@Override
|
|
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
|
req.getSession().invalidate();
|
|
resp.sendRedirect(resp.encodeRedirectURL(config.getApplicationSettings().getPublicUrl()));
|
|
}
|
|
}
|