Package org.mycore.user2.login
Class MCRLoginServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.mycore.frontend.servlets.MCRServlet
org.mycore.user2.login.MCRLoginServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
Provides functionality to select login method,
change login user and show a welcome page.
Login methods and realms are configured in realms.xml.
The login form for local users is login.xml.
- Author:
- Frank Lützenkirchen, Thomas Scheffler (yagee)
- See Also:
-
Field Summary
Fields inherited from class org.mycore.frontend.servlets.MCRServlet
ATTR_MYCORE_SESSION, CURRENT_THREAD_NAME_KEY, INITIAL_SERVLET_NAME_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static void
addFormFields
(MCRLogin login, String loginToRealm) void
doGetPost
(MCRServletJob job) MCRLoginServlet handles four actions: MCRLoginServlet?protected static String
getReturnURL
(jakarta.servlet.http.HttpServletRequest req) void
init()
protected void
Methods inherited from class org.mycore.frontend.servlets.MCRServlet
allowCrossDomainRequests, buildRedirectURL, cleanupMCRSession, doGet, doGet, doPost, doPost, getErrorI18N, getLastModified, getLayoutService, getProperty, getReferer, getServletBaseURL, getSession, handleException, initializeMCRSession, render, reportException, think, toReferrer, toReferrer
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, service, service
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
REALM_URL_PARAMETER
- See Also:
-
LOCAL_LOGIN_SECURE_ONLY
protected static final boolean LOCAL_LOGIN_SECURE_ONLY
-
-
Constructor Details
-
MCRLoginServlet
public MCRLoginServlet()
-
-
Method Details
-
init
public void init() throws jakarta.servlet.ServletException- Overrides:
init
in classMCRServlet
- Throws:
jakarta.servlet.ServletException
-
doGetPost
MCRLoginServlet handles four actions: MCRLoginServlet?url=foo stores foo as redirect url and displays a list of login method options. MCRLoginServlet?url=foo&realm=ID stores foo as redirect url and redirects to the login URL of the given realm. MCRLoginServlet?action=login checks input from editor login form and changes the current login user and redirects to the stored url. MCRLoginServlet?action=cancel does not change login user, just redirects to the target url- Overrides:
doGetPost
in classMCRServlet
- Throws:
Exception
-
getReturnURL
-
presentLoginForm
protected void presentLoginForm(MCRServletJob job) throws IOException, TransformerException, SAXException, jakarta.xml.bind.JAXBException - Throws:
IOException
TransformerException
SAXException
jakarta.xml.bind.JAXBException
-
addFormFields
-