Package org.oa4mp.server.proxy
Class OA2AuthenticationServer
- 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.server.api.storage.servlet.AbstractAuthenticationServlet
-
- org.oa4mp.server.proxy.OA2AuthenticationServer
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable
,edu.uiuc.ncsa.security.servlet.Presentable
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
,TransactionFilter
- Direct Known Subclasses:
OA2AuthorizationServer
,ProxyCallbackServlet
public class OA2AuthenticationServer extends AbstractAuthenticationServlet
This is deployed as the /authorize endpoint.Created by Jeff Gaynor
on 2/7/14 at 11:44 AM- 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 OA2AuthenticationServer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
createCallback(ServiceTransaction trans, Map<String,String> params)
This will take whatever the passed in callback from the client is and append any parameters needed.protected void
createRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ServiceTransaction trans)
protected void
createRedirectInit(ServiceTransaction trans, String userName, String password)
Additional setup for the callback.protected void
doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
doProxy(AbstractAuthenticationServlet.AuthorizedState state)
protected OA2AuthorizedServletUtil
getInitUtil()
void
prepare(edu.uiuc.ncsa.security.servlet.PresentableState state)
protected static String
scopesToString(Collection<String> listOfScopes)
protected static String
scopesToString(OA2ServiceTransaction t)
Turn the scopes into a string.protected void
setClientRequestAttributes(AbstractAuthenticationServlet.AuthorizedState aState)
-
Methods inherited from class org.oa4mp.server.api.storage.servlet.AbstractAuthenticationServlet
checkUser, getAndCheckTransaction, getInitialPage, getOkPage, getParam, getRemoteUserInitialPage, getState, handleError, present, verifyAndGet
-
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
-
createRedirectInit
protected void createRedirectInit(ServiceTransaction trans, String userName, String password)
Description copied from class:AbstractAuthenticationServlet
Additional setup for the callback. This is aimed at MyProxy aware services.- Specified by:
createRedirectInit
in classAbstractAuthenticationServlet
-
scopesToString
protected static String scopesToString(OA2ServiceTransaction t)
Turn the scopes into a string. Since the user may send the same scope repetedly- Parameters:
t
-- Returns:
-
scopesToString
protected static String scopesToString(Collection<String> listOfScopes)
-
setClientRequestAttributes
protected void setClientRequestAttributes(AbstractAuthenticationServlet.AuthorizedState aState)
- Overrides:
setClientRequestAttributes
in classAbstractAuthenticationServlet
-
getInitUtil
protected OA2AuthorizedServletUtil getInitUtil()
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Throwable
- Overrides:
doIt
in classAbstractAuthenticationServlet
- Throws:
Throwable
-
prepare
public void prepare(edu.uiuc.ncsa.security.servlet.PresentableState state) throws Throwable
- Specified by:
prepare
in interfaceedu.uiuc.ncsa.security.servlet.Presentable
- Overrides:
prepare
in classAbstractAuthenticationServlet
- Throws:
Throwable
-
createRedirect
protected void createRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ServiceTransaction trans) throws Throwable
- Overrides:
createRedirect
in classAbstractAuthenticationServlet
- Throws:
Throwable
-
createCallback
public String createCallback(ServiceTransaction trans, Map<String,String> params)
Description copied from class:AbstractAuthenticationServlet
This will take whatever the passed in callback from the client is and append any parameters needed. Generally these parameters are protocol specific.- Specified by:
createCallback
in classAbstractAuthenticationServlet
- Returns:
-
doProxy
protected void doProxy(AbstractAuthenticationServlet.AuthorizedState state) throws Throwable
- Overrides:
doProxy
in classAbstractAuthenticationServlet
- Throws:
Throwable
-
-