1
|
package eu.dnetlib.openaire.usermanagement;
|
2
|
|
3
|
import eu.dnetlib.openaire.usermanagement.utils.AuthenticationUtils;
|
4
|
import org.mitre.openid.connect.model.OIDCAuthenticationToken;
|
5
|
import org.springframework.beans.factory.annotation.Value;
|
6
|
import org.springframework.security.core.context.SecurityContextHolder;
|
7
|
import org.springframework.web.context.support.SpringBeanAutowiringSupport;
|
8
|
|
9
|
import javax.servlet.ServletConfig;
|
10
|
import javax.servlet.ServletException;
|
11
|
import javax.servlet.http.HttpServlet;
|
12
|
import javax.servlet.http.HttpServletRequest;
|
13
|
import javax.servlet.http.HttpServletResponse;
|
14
|
import java.io.IOException;
|
15
|
|
16
|
public class OverviewServlet extends HttpServlet {
|
17
|
|
18
|
public void doGet(HttpServletRequest request, HttpServletResponse response)
|
19
|
throws ServletException, IOException {
|
20
|
|
21
|
request.getSession().setAttribute("authenticated",
|
22
|
!SecurityContextHolder.getContext().getAuthentication().getPrincipal().toString()
|
23
|
.equals("anonymousUser"));
|
24
|
|
25
|
response.setContentType("text/html");
|
26
|
request.getRequestDispatcher("./overview.jsp").include(request, response);
|
27
|
}
|
28
|
}
|