Package org.openrefine.wikibase.commands
Class LoginCommand
- java.lang.Object
-
- org.openrefine.commands.Command
-
- org.openrefine.wikibase.commands.LoginCommand
-
public class LoginCommand extends Command
Handles login.Both logging in with username/password or owner-only consumer are supported.
This command also manages cookies of login credentials.
Cookies for different MediaWiki API endpoint are stored, but only one connection is kept at the same time.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openrefine.commands.Command
Command.HistoryEntryResponse
-
-
Field Summary
Fields Modifier and Type Field Description protected ConnectionManager
manager
-
Fields inherited from class org.openrefine.commands.Command
csrfFactory, logger, servlet
-
-
Constructor Summary
Constructors Constructor Description LoginCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
void
doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
respond(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
setConnectionManager(ConnectionManager connectionManager)
-
Methods inherited from class org.openrefine.commands.Command
addHistoryEntryAndRespond, doDelete, doPut, getEngine, getEngineConfig, getIntegerParameter, getLongParameter, getProject, getProjectMetadata, getSortingConfig, hasValidCSRFToken, hasValidCSRFTokenAsGET, init, logRequests, redirect, respondCSRFError, respondError, respondError, respondJSON, respondJSON, respondOK, respondWithErrorPage
-
-
-
-
Field Detail
-
manager
protected ConnectionManager manager
-
-
Method Detail
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
- Overrides:
doPost
in classCommand
- Throws:
javax.servlet.ServletException
IOException
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
- Overrides:
doGet
in classCommand
- Throws:
javax.servlet.ServletException
IOException
-
respond
protected void respond(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
setConnectionManager
protected void setConnectionManager(ConnectionManager connectionManager)
-
-