Class AbstractRegistrationServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.uiuc.ncsa.security.servlet.AbstractServlet
-
- org.oa4mp.server.api.servlet.storage.EnvServlet
-
- org.oa4mp.server.api.servlet.storage.MyProxyDelegationServlet
-
- org.oa4mp.server.api.servlet.storage.AbstractRegistrationServlet
-
- All Implemented Interfaces:
TransactionFilter
,edu.uiuc.ncsa.security.core.Logable
,edu.uiuc.ncsa.security.servlet.Presentable
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
- Direct Known Subclasses:
OA2AdminRegistrationServlet
,OA2RegistrationServlet
,RegistrationServlet
public abstract class AbstractRegistrationServlet extends MyProxyDelegationServlet implements edu.uiuc.ncsa.security.servlet.Presentable
Created by Jeff Gaynor
on 10/3/14 at 10:46 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractRegistrationServlet.ClientRegistrationRetryException
protected static class
AbstractRegistrationServlet.ClientState
-
Field Summary
Fields Modifier and Type Field Description static String
CLIENT_ACTION_KEY
static String
CLIENT_ACTION_REQUEST_VALUE
static String
CLIENT_EMAIL
static String
CLIENT_ERROR_URL
static String
CLIENT_HOME_URL
static String
CLIENT_IS_PUBLIC
static String
CLIENT_NAME
static String
CLIENT_PROXY_LIMITED
static String
CLIENT_PUBLIC_KEY
protected String
emailPattern
static String
ERROR_PAGE
The name of a JSP page to display in case of errors.protected static int
ERROR_STATE
static String
INIT_PAGE
The page to display to the client for the initial request.protected static int
INITIAL_STATE
static String
OK_PAGE
If the registration works, this is the page to display to the user afterwards.protected static int
REQUEST_STATE
-
Fields inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.MyProxyDelegationServlet
caThread, kpt, lastAccessedThread, myproxyConnectionCache, myproxyConnectionCleanup, transactionCleanup
-
Fields inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.EnvServlet
ERROR_NOTIFICATION_BODY_KEY, ERROR_NOTIFICATION_SUBJECT_KEY, notificationListeners, storeUpdatesDone
-
-
Constructor Summary
Constructors Constructor Description AbstractRegistrationServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BaseClient
addNewClient(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
fireNewClientEvent(NewClientEvent newClientEvent)
protected String
getErrorPage()
protected String
getInitPage()
protected String
getOKPage()
protected String
getParameter(javax.servlet.http.HttpServletRequest req, String key)
protected String
getRequiredParam(javax.servlet.http.HttpServletRequest req, String key, BaseClient client)
int
getState(javax.servlet.http.HttpServletRequest request)
protected String
getValueTag(String key)
For a key (e.g.void
handleError(edu.uiuc.ncsa.security.servlet.PresentableState state, Throwable t)
void
prepare(edu.uiuc.ncsa.security.servlet.PresentableState state)
void
present(edu.uiuc.ncsa.security.servlet.PresentableState state)
protected void
save(BaseClient client)
protected void
setRetryParameters(javax.servlet.http.HttpServletRequest request, edu.uiuc.ncsa.security.core.exceptions.RetryException r)
Sets the parameters from the request so they can be passed back.protected BaseClient
setupNewClient(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
ServiceTransaction
verifyAndGet(IssuerResponse iResponse)
This is called after the response is received so that the system can get the approproate transaction.-
Methods inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.MyProxyDelegationServlet
checkClientApproval, createDebugger, destroy, getAGI, getATI, getClient, getClient, getClient, getFirstParameters, getGrantIDFromRequest, getMPConnection, getMPConnection, getMyproxyConnectionCache, getMyproxyServices, getServiceEnvironment, getTransaction, getTransactionByGrantID, getTransactionStore, hasMPConnection, hasMPConnection, isEmpty, loadProperties2, newTransaction, postprocess, preprocess, realStoreUpdates, say, shutdownCleanup, storeUpdates
-
Methods inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.EnvServlet
addNotificationListener, loadEnvironment, processStoreCheck, removeNotificationListener
-
Methods inherited from class edu.uiuc.ncsa.security.servlet.AbstractServlet
checkContentType, CONST, debug, doGet, doPing, doPost, error, error, getConfigurationLoader, getEnvironment, getExceptionHandler, getFirstParameterValue, getInitialization, getMyLogger, handleException, info, init, isDebugOn, printAllParameters, printAllParameters, resetState, setConfigurationLoader, setDebugOn, setEnvironment, setExceptionHandler, setInitialization, warn
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Field Detail
-
CLIENT_NAME
public static final String CLIENT_NAME
- See Also:
- Constant Field Values
-
CLIENT_PUBLIC_KEY
public static final String CLIENT_PUBLIC_KEY
- See Also:
- Constant Field Values
-
CLIENT_HOME_URL
public static final String CLIENT_HOME_URL
- See Also:
- Constant Field Values
-
CLIENT_ERROR_URL
public static final String CLIENT_ERROR_URL
- See Also:
- Constant Field Values
-
CLIENT_EMAIL
public static final String CLIENT_EMAIL
- See Also:
- Constant Field Values
-
CLIENT_PROXY_LIMITED
public static final String CLIENT_PROXY_LIMITED
- See Also:
- Constant Field Values
-
CLIENT_IS_PUBLIC
public static final String CLIENT_IS_PUBLIC
- See Also:
- Constant Field Values
-
CLIENT_ACTION_KEY
public static final String CLIENT_ACTION_KEY
- See Also:
- Constant Field Values
-
CLIENT_ACTION_REQUEST_VALUE
public static final String CLIENT_ACTION_REQUEST_VALUE
- See Also:
- Constant Field Values
-
INITIAL_STATE
protected static final int INITIAL_STATE
- See Also:
- Constant Field Values
-
ERROR_STATE
protected static final int ERROR_STATE
- See Also:
- Constant Field Values
-
REQUEST_STATE
protected static final int REQUEST_STATE
- See Also:
- Constant Field Values
-
INIT_PAGE
public static String INIT_PAGE
The page to display to the client for the initial request.
-
ERROR_PAGE
public static String ERROR_PAGE
The name of a JSP page to display in case of errors. The default is "registration-error.jsp".
-
OK_PAGE
public static String OK_PAGE
If the registration works, this is the page to display to the user afterwards.
-
emailPattern
protected String emailPattern
-
-
Method Detail
-
verifyAndGet
public ServiceTransaction verifyAndGet(IssuerResponse iResponse) throws IOException
Description copied from class:MyProxyDelegationServlet
This is called after the response is received so that the system can get the approproate transaction. Checks for the validity of the transaction should be done here too.- Specified by:
verifyAndGet
in classMyProxyDelegationServlet
- Returns:
- Throws:
IOException
-
getState
public int getState(javax.servlet.http.HttpServletRequest request)
-
fireNewClientEvent
protected void fireNewClientEvent(NewClientEvent newClientEvent)
-
prepare
public void prepare(edu.uiuc.ncsa.security.servlet.PresentableState state) throws Throwable
- Specified by:
prepare
in interfaceedu.uiuc.ncsa.security.servlet.Presentable
- Throws:
Throwable
-
getInitPage
protected String getInitPage()
-
getErrorPage
protected String getErrorPage()
-
getOKPage
protected String getOKPage()
-
present
public void present(edu.uiuc.ncsa.security.servlet.PresentableState state) throws Throwable
- Specified by:
present
in interfaceedu.uiuc.ncsa.security.servlet.Presentable
- Throws:
Throwable
-
handleError
public void handleError(edu.uiuc.ncsa.security.servlet.PresentableState state, Throwable t) throws IOException, javax.servlet.ServletException
- Specified by:
handleError
in interfaceedu.uiuc.ncsa.security.servlet.Presentable
- Throws:
IOException
javax.servlet.ServletException
-
getValueTag
protected String getValueTag(String key)
For a key (e.g. clientName) the associated form value is usually name+"Value" (e.g. clientNameValue). This method creates these value tags.- Parameters:
key
-- Returns:
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Throwable
- Specified by:
doIt
in classedu.uiuc.ncsa.security.servlet.AbstractServlet
- Throws:
Throwable
-
save
protected void save(BaseClient client)
-
setRetryParameters
protected void setRetryParameters(javax.servlet.http.HttpServletRequest request, edu.uiuc.ncsa.security.core.exceptions.RetryException r)
Sets the parameters from the request so they can be passed back.- Parameters:
request
-r
-
-
getRequiredParam
protected String getRequiredParam(javax.servlet.http.HttpServletRequest req, String key, BaseClient client)
-
setupNewClient
protected BaseClient setupNewClient(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Throwable
- Throws:
Throwable
-
addNewClient
protected BaseClient addNewClient(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Throwable
- Throws:
Throwable
-
-