Class AbstractAccessTokenServlet
- 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.AbstractAccessTokenServlet
-
- All Implemented Interfaces:
TransactionFilter
,edu.uiuc.ncsa.security.core.Logable
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public abstract class AbstractAccessTokenServlet extends MyProxyDelegationServlet
Created by Jeff Gaynor
on 9/25/13 at 1:37 PM- See Also:
- Serialized Form
-
-
Field Summary
-
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 AbstractAccessTokenServlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract AuthorizationGrant
checkAGExpiration(AuthorizationGrant ag)
Contract: if the token gets updated (might have to because of changes to token versions), return it.protected IssuerTransactionState
doDelegation(Client client, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
protected IssuerTransactionState
doDelegation(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
Note that this method does not write the response (using the issuer response).protected void
doIt(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
protected abstract ATRequest
getATRequest(javax.servlet.http.HttpServletRequest request, ServiceTransaction transaction)
protected IssuerTransactionState
getIssuerTransactionState(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, AuthorizationGrant updatedAG, ServiceTransaction transaction, edu.uiuc.ncsa.security.storage.XMLMap backup)
Default for standard token endpoint call.protected IssuerTransactionState
getIssuerTransactionState(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, AuthorizationGrant updatedAG, ServiceTransaction transaction, edu.uiuc.ncsa.security.storage.XMLMap backup, boolean isRFC8628)
protected abstract ServiceTransaction
getTransaction(AuthorizationGrant ag, javax.servlet.http.HttpServletRequest req)
-
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
-
-
-
-
Method Detail
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws Throwable
- Specified by:
doIt
in classedu.uiuc.ncsa.security.servlet.AbstractServlet
- Throws:
Throwable
-
getATRequest
protected abstract ATRequest getATRequest(javax.servlet.http.HttpServletRequest request, ServiceTransaction transaction)
-
getTransaction
protected abstract ServiceTransaction getTransaction(AuthorizationGrant ag, javax.servlet.http.HttpServletRequest req) throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
-
checkAGExpiration
protected abstract AuthorizationGrant checkAGExpiration(AuthorizationGrant ag)
Contract: if the token gets updated (might have to because of changes to token versions), return it. If no changes, return null.- Parameters:
ag
-- Returns:
-
doDelegation
protected IssuerTransactionState doDelegation(Client client, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws Throwable, javax.servlet.ServletException
- Throws:
Throwable
javax.servlet.ServletException
-
getIssuerTransactionState
protected IssuerTransactionState getIssuerTransactionState(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, AuthorizationGrant updatedAG, ServiceTransaction transaction, edu.uiuc.ncsa.security.storage.XMLMap backup) throws Throwable
Default for standard token endpoint call.- Parameters:
httpServletRequest
-httpServletResponse
-updatedAG
-transaction
-- Returns:
- Throws:
Throwable
-
getIssuerTransactionState
protected IssuerTransactionState getIssuerTransactionState(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, AuthorizationGrant updatedAG, ServiceTransaction transaction, edu.uiuc.ncsa.security.storage.XMLMap backup, boolean isRFC8628) throws Throwable
- Throws:
Throwable
-
doDelegation
protected IssuerTransactionState doDelegation(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws Throwable, javax.servlet.ServletException
Note that this method does not write the response (using the issuer response). You must do that in your implementation after you have finished all processing. If we were to do that here, the response would be written prematurely.- Parameters:
httpServletRequest
-httpServletResponse
-- Returns:
- Throws:
Throwable
javax.servlet.ServletException
-
-