Package org.oa4mp.myproxy.servlet
Class AuthorizedServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.uiuc.ncsa.security.servlet.AbstractServlet
-
- org.oa4mp.server.api.storage.servlet.EnvServlet
-
- org.oa4mp.server.api.storage.servlet.OA4MPServlet
-
- org.oa4mp.myproxy.servlet.MyProxyServlet
-
- org.oa4mp.myproxy.servlet.AuthorizedServlet
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig,org.oa4mp.delegation.common.servlet.TransactionFilter
public abstract class AuthorizedServlet extends MyProxyServlet
For deployment in cases that there is a wholly external authorization webapp. That webapp makes a call to this servlet following a specific mini-protocol and the response from this servlet contains the redirect url which must then cause a redirect in the user's browser.Created by Jeff Gaynor
on 2/13/14 at 3:24 PM - See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthorizedServlet.ProtocolParameters-
Nested classes/interfaces inherited from class org.oa4mp.myproxy.servlet.MyProxyServlet
MyProxyServlet.MyMyProxyLogon
-
-
Field Summary
Fields Modifier and Type Field Description static StringREDIRECT_URL_KEYstatic StringSTATUS_KEYstatic StringSTATUS_OK-
Fields inherited from class org.oa4mp.myproxy.servlet.MyProxyServlet
myproxyConnectionCache, myproxyConnectionCleanup
-
Fields inherited from class org.oa4mp.server.api.storage.servlet.OA4MPServlet
caThread, kpt, lastAccessedThread, transactionCleanup
-
Fields inherited from class org.oa4mp.server.api.storage.servlet.EnvServlet
ERROR_NOTIFICATION_BODY_KEY, ERROR_NOTIFICATION_SUBJECT_KEY, notificationListeners, storeUpdatesDone
-
-
Constructor Summary
Constructors Constructor Description AuthorizedServlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringcreateCallback(ServiceTransaction transaction)protected voiddoIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected ServiceTransactiongetAndCheckTransaction(AuthorizedServlet.ProtocolParameters p)protected abstract AuthorizedServlet.ProtocolParametersparseRequest(javax.servlet.http.HttpServletRequest request)This will take the HTTP request and parse it into parameters.protected voidwriteResponse(javax.servlet.http.HttpServletResponse response, ServiceTransaction transaction)Write the response to the output stream and returns the callback that was generated, if there is one.-
Methods inherited from class org.oa4mp.myproxy.servlet.MyProxyServlet
createMPConnection, createMPConnection, destroy, doCertRequest, doRealCertRequest, getAccessToken, getMPConnection, getMPConnection, getMyproxyConnectionCache, getX509Certificates, hasMPConnection, hasMPConnection
-
Methods inherited from class org.oa4mp.server.api.storage.servlet.OA4MPServlet
checkAdminClientStatus, checkClientApproval, createDebugger, getAGI, getATI, getClient, getClient, getClient, getFirstParameters, getFirstParameterValue, getGrantIDFromRequest, getServiceEnvironment, getTransaction, getTransactionByGrantID, getTransactionStore, isEmpty, loadProperties2, newTransaction, postprocess, preprocess, realStoreUpdates, say, shutdownCleanup, storeUpdates, verifyAndGet
-
Methods inherited from class org.oa4mp.server.api.storage.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, getInitialization, getMyLogger, getRequestIPAddress, handleException, info, init, isDebugOn, logOK, logOK, 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
-
STATUS_KEY
public static final String STATUS_KEY
- See Also:
- Constant Field Values
-
STATUS_OK
public static final String STATUS_OK
- See Also:
- Constant Field Values
-
REDIRECT_URL_KEY
public static final String REDIRECT_URL_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
createCallback
public abstract String createCallback(ServiceTransaction transaction)
-
parseRequest
protected abstract AuthorizedServlet.ProtocolParameters parseRequest(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
This will take the HTTP request and parse it into parameters. This method is the one to override if you have tweaks to the basic protocol.- Parameters:
request-- Returns:
- Throws:
javax.servlet.ServletException
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Throwable- Specified by:
doItin classedu.uiuc.ncsa.security.servlet.AbstractServlet- Throws:
Throwable
-
writeResponse
protected void writeResponse(javax.servlet.http.HttpServletResponse response, ServiceTransaction transaction) throws IOExceptionWrite the response to the output stream and returns the callback that was generated, if there is one.- Parameters:
response-transaction-- Throws:
IOException
-
getAndCheckTransaction
protected ServiceTransaction getAndCheckTransaction(AuthorizedServlet.ProtocolParameters p) throws Throwable
- Throws:
Throwable
-
-