Class LoginServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
ch.tocco.nice2.web.core.api.auth.SecureServlet
ch.tocco.nice2.web.core.impl.servlet.req.LoginServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
Returns a JSON object containing the following information:
- success (true, if a known principal currently is logged in (not anonymous))
- timeout (how long the session is valid (in minutes))
This servlet actually doesn't refresh the session. This is done in the
AuthenticationFilter
. This servlet only returns the information.
If the current user is anonymous and no credentials have been submitted,
a basic authentication challenge is sent to the client.- See Also:
-
Field Summary
Fields inherited from class ch.tocco.nice2.web.core.api.auth.SecureServlet
runEnvironmentService
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
ConstructorDescriptionLoginServlet
(CredentialsRetrieverService credentialsRetrieverService, PrincipalDetailService principalDetailService, RunEnvironmentService runEnvironmentService, SecureSettings settings, QueryBuilderFactory queryBuilderFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doPost
(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Methods inherited from class ch.tocco.nice2.web.core.api.auth.SecureServlet
checkSecuredConnection, service
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, init, service
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
LoginServlet
@Lazy public LoginServlet(CredentialsRetrieverService credentialsRetrieverService, PrincipalDetailService principalDetailService, RunEnvironmentService runEnvironmentService, SecureSettings settings, QueryBuilderFactory queryBuilderFactory)
-
-
Method Details
-
doPost
protected void doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws IOException - Overrides:
doPost
in classjakarta.servlet.http.HttpServlet
- Throws:
IOException
-