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_VALUE, AUTHORIZATION_ACTION_DONE, AUTHORIZATION_ACTION_DONE_VALUE, AUTHORIZATION_ACTION_KEY, AUTHORIZATION_ACTION_OK, AUTHORIZATION_ACTION_OK_VALUE, AUTHORIZATION_ACTION_PROXY_DF_CONSENT, AUTHORIZATION_ACTION_START, AUTHORIZATION_GRANT_KEY, AUTHORIZATION_PASSWORD_KEY, AUTHORIZATION_STATE_KEY, AUTHORIZATION_USER_NAME_KEY, AUTHORIZATION_USER_NAME_VALUE, DF_USER_CODE_KEY, ERROR_PAGE, INITIAL_PAGE, OK_PAGE, PROXY_KEY, REMOTE_USER_INITIAL_PAGE, RESPONSE_TYPE_DF_VALUE, RESPONSE_TYPE_KEY, RESPONSE_TYPE_TOKEN_VALUE, RETRY_MESSAGE, TOKEN_KEY_KEY
-
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 StringcreateCallback(ServiceTransaction trans, Map<String,String> params)This will take whatever the passed in callback from the client is and append any parameters needed.protected voidcreateRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ServiceTransaction trans)protected voidcreateRedirectInit(ServiceTransaction trans, String userName, String password)Additional setup for the callback.protected voiddoIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voiddoProxy(AbstractAuthenticationServlet.AuthorizedState state)protected OA2AuthorizedServletUtilgetInitUtil()voidprepare(edu.uiuc.ncsa.security.servlet.PresentableState state)protected static StringscopesToString(Collection<String> listOfScopes)protected static StringscopesToString(OA2ServiceTransaction t)Turn the scopes into a string.protected voidsetClientRequestAttributes(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, findSigningKey, 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, checkCancel, checkCancel, isCancelled, 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:AbstractAuthenticationServletAdditional setup for the callback. This is aimed at MyProxy aware services.- Specified by:
createRedirectInitin 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:
setClientRequestAttributesin classAbstractAuthenticationServlet
-
getInitUtil
protected OA2AuthorizedServletUtil getInitUtil()
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Throwable- Overrides:
doItin classAbstractAuthenticationServlet- Throws:
Throwable
-
prepare
public void prepare(edu.uiuc.ncsa.security.servlet.PresentableState state) throws Throwable- Specified by:
preparein interfaceedu.uiuc.ncsa.security.servlet.Presentable- Overrides:
preparein classAbstractAuthenticationServlet- Throws:
Throwable
-
createRedirect
protected void createRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ServiceTransaction trans) throws Throwable- Overrides:
createRedirectin classAbstractAuthenticationServlet- Throws:
Throwable
-
createCallback
public String createCallback(ServiceTransaction trans, Map<String,String> params)
Description copied from class:AbstractAuthenticationServletThis will take whatever the passed in callback from the client is and append any parameters needed. Generally these parameters are protocol specific.- Specified by:
createCallbackin classAbstractAuthenticationServlet- Returns:
-
doProxy
protected void doProxy(AbstractAuthenticationServlet.AuthorizedState state) throws Throwable
- Overrides:
doProxyin classAbstractAuthenticationServlet- Throws:
Throwable
-
-