Class AuthorizedServlet
- 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.CRServlet
-
- org.oa4mp.server.api.servlet.storage.AuthorizedServlet
-
- All Implemented Interfaces:
TransactionFilter
,edu.uiuc.ncsa.security.core.Logable
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public abstract class AuthorizedServlet extends CRServlet
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 class
AuthorizedServlet.ProtocolParameters
-
Field Summary
Fields Modifier and Type Field Description static String
REDIRECT_URL_KEY
static String
STATUS_KEY
static String
STATUS_OK
-
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 AuthorizedServlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
createCallback(ServiceTransaction transaction)
protected void
doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected ServiceTransaction
getAndCheckTransaction(AuthorizedServlet.ProtocolParameters p)
protected abstract AuthorizedServlet.ProtocolParameters
parseRequest(javax.servlet.http.HttpServletRequest request)
This will take the HTTP request and parse it into parameters.protected void
writeResponse(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 edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.CRServlet
createMPConnection, createMPConnection, doCertRequest, doRealCertRequest, getAccessToken, getX509Certificates
-
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, verifyAndGet
-
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
-
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:
doIt
in classedu.uiuc.ncsa.security.servlet.AbstractServlet
- Throws:
Throwable
-
writeResponse
protected void writeResponse(javax.servlet.http.HttpServletResponse response, ServiceTransaction transaction) throws IOException
Write 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
-
-