Package org.oa4mp.server.proxy
Class ProxyCallbackServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.uiuc.ncsa.security.servlet.AbstractServlet
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable
,edu.uiuc.ncsa.security.servlet.Presentable
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
,TransactionFilter
public class ProxyCallbackServlet extends OA2AuthenticationServer
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 org.oa4mp.server.api.storage.servlet.AbstractAuthenticationServlet
AbstractAuthenticationServlet.AuthorizedState, AbstractAuthenticationServlet.MyHttpServletResponseWrapper, AbstractAuthenticationServlet.UserLoginException
-
-
Field Summary
-
Fields inherited from class org.oa4mp.server.api.storage.servlet.AbstractAuthenticationServlet
AUTHORIZATION_ACTION_DF_CONSENT, AUTHORIZATION_ACTION_DF_CONSENT_VALUE, AUTHORIZATION_ACTION_DONE, AUTHORIZATION_ACTION_DONE_VALUE, 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 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 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.protected void
setClientConsentAttributes(javax.servlet.http.HttpServletRequest request, OA2ServiceTransaction t)
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 org.oa4mp.server.proxy.OA2AuthenticationServer
createCallback, createRedirect, createRedirectInit, doProxy, getInitUtil, prepare, scopesToString, scopesToString, setClientRequestAttributes
-
Methods inherited from class org.oa4mp.server.api.storage.servlet.AbstractAuthenticationServlet
checkUser, getAndCheckTransaction, getInitialPage, getOkPage, getParam, getRemoteUserInitialPage, getState, handleError, present
-
Methods inherited from class org.oa4mp.server.api.storage.servlet.OA4MPServlet
checkAdminClientStatus, checkClientApproval, createDebugger, destroy, getAGI, getATI, getClient, getClient, getClient, getFirstParameters, getFirstParameterValue, getGrantIDFromRequest, getServiceEnvironment, getTransaction, getTransactionByGrantID, getTransactionStore, isEmpty, loadProperties2, newTransaction, postprocess, preprocess, realStoreUpdates, say, shutdownCleanup, storeUpdates
-
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
-
-
-
-
Method Detail
-
verifyAndGet
public ServiceTransaction verifyAndGet(IssuerResponse iResponse) throws IOException
Description copied from class:OA4MPServlet
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 classAbstractAuthenticationServlet
- 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 transaction 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 classOA2AuthenticationServer
- Parameters:
request
-response
-- Throws:
Throwable
-
setClientConsentAttributes
protected void setClientConsentAttributes(javax.servlet.http.HttpServletRequest request, OA2ServiceTransaction t)
-
-