Package edu.uiuc.ncsa.oa2.servlet
Class ProxyCallbackServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.uiuc.ncsa.security.servlet.AbstractServlet
-
- All Implemented Interfaces:
TransactionFilter
,edu.uiuc.ncsa.security.core.Logable
,edu.uiuc.ncsa.security.servlet.Presentable
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class ProxyCallbackServlet extends OA2AuthorizationServer
Created by Jeff Gaynor
on 3/3/22 at 4:33 PM- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.AbstractAuthorizationServlet
AbstractAuthorizationServlet.AuthorizedState, AbstractAuthorizationServlet.MyHttpServletResponseWrapper, AbstractAuthorizationServlet.MyMyProxyLogon, AbstractAuthorizationServlet.UserLoginException
-
-
Field Summary
-
Fields inherited from class edu.uiuc.ncsa.oa2.servlet.OA2AuthorizationServer
AUTHORIZATION_REFRESH_TOKEN_LIFETIME_KEY, AUTHORIZATION_REFRESH_TOKEN_LIFETIME_VALUE, AUTHORIZED_ENDPOINT
-
Fields inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.AbstractAuthorizationServlet
AUTHORIZATION_ACTION_KEY, AUTHORIZATION_ACTION_OK, AUTHORIZATION_ACTION_OK_VALUE, AUTHORIZATION_ACTION_START, AUTHORIZATION_PASSWORD_KEY, AUTHORIZATION_USER_NAME_KEY, AUTHORIZATION_USER_NAME_VALUE, ERROR_PAGE, INITIAL_PAGE, OK_PAGE, REMOTE_USER_INITIAL_PAGE, RETRY_MESSAGE
-
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 ProxyCallbackServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Processes the callback from the proxy.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.oa2.servlet.OA2AuthorizationServer
createCallback, createRedirect, doProxy, doRealCertRequest, getAccessToken, getInitUtil, prepare, scopesToString, scopesToString, setClientRequestAttributes, setupMPConnection
-
Methods inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.AbstractAuthorizationServlet
checkUser, getAndCheckTransaction, getInitialPage, getOkPage, getParam, getRemoteUserInitialPage, getState, handleError, present
-
Methods inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.CRServlet
createMPConnection, createMPConnection, doCertRequest, 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
-
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
-
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.- Overrides:
verifyAndGet
in classAbstractAuthorizationServlet
- Returns:
- Throws:
IOException
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Throwable
Processes the callback from the proxy. This will take the proxy's callback and transform it into the correct transactioin at our end, then get the access token from the proxy.
The access token also includes the user's meta data (such as subject) and the is used to populate the username in the server. When this is done, the server is ready to do its callback.- Overrides:
doIt
in classOA2AuthorizationServer
- Parameters:
request
-response
-- Throws:
Throwable
-
-