Package edu.uiuc.ncsa.oa2.servlet
Class OA2AuthorizationServer
- 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
- Direct Known Subclasses:
ProxyCallbackServlet
public class OA2AuthorizationServer extends AbstractAuthorizationServlet
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 edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.AbstractAuthorizationServlet
AbstractAuthorizationServlet.AuthorizedState, AbstractAuthorizationServlet.MyHttpServletResponseWrapper, AbstractAuthorizationServlet.MyMyProxyLogon, AbstractAuthorizationServlet.UserLoginException
-
-
Field Summary
Fields Modifier and Type Field Description String
AUTHORIZATION_REFRESH_TOKEN_LIFETIME_KEY
String
AUTHORIZATION_REFRESH_TOKEN_LIFETIME_VALUE
String
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 OA2AuthorizationServer()
-
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
doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
doProxy(AbstractAuthorizationServlet.AuthorizedState state)
protected void
doRealCertRequest(ServiceTransaction trans, String statusString)
Spec says we do the cert request in the authorization servlet.protected AccessToken
getAccessToken(javax.servlet.http.HttpServletRequest request)
There are various requirements for transmitting the access token, so specific methods have to be used.protected OA2AuthorizedServletUtil
getInitUtil()
void
prepare(edu.uiuc.ncsa.security.servlet.PresentableState state)
protected static String
scopesToString(OA2ServiceTransaction t)
protected static String
scopesToString(Collection<String> listOfScopes)
protected void
setClientRequestAttributes(AbstractAuthorizationServlet.AuthorizedState aState)
protected void
setupMPConnection(ServiceTransaction trans, String username, String password)
-
Methods inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.AbstractAuthorizationServlet
checkUser, getAndCheckTransaction, getInitialPage, getOkPage, getParam, getRemoteUserInitialPage, getState, handleError, present, verifyAndGet
-
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
-
getAccessToken
protected AccessToken getAccessToken(javax.servlet.http.HttpServletRequest request)
Description copied from class:CRServlet
There are various requirements for transmitting the access token, so specific methods have to be used.- Specified by:
getAccessToken
in classCRServlet
- Returns:
-
scopesToString
protected static String scopesToString(OA2ServiceTransaction t)
-
scopesToString
protected static String scopesToString(Collection<String> listOfScopes)
-
setClientRequestAttributes
protected void setClientRequestAttributes(AbstractAuthorizationServlet.AuthorizedState aState)
- Overrides:
setClientRequestAttributes
in classAbstractAuthorizationServlet
-
getInitUtil
protected OA2AuthorizedServletUtil getInitUtil()
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Throwable
- Overrides:
doIt
in classAbstractAuthorizationServlet
- 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 classAbstractAuthorizationServlet
- Throws:
Throwable
-
createRedirect
protected void createRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ServiceTransaction trans) throws Throwable
- Overrides:
createRedirect
in classAbstractAuthorizationServlet
- Throws:
Throwable
-
createCallback
public String createCallback(ServiceTransaction trans, Map<String,String> params)
Description copied from class:AbstractAuthorizationServlet
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 classAbstractAuthorizationServlet
- Returns:
-
doRealCertRequest
protected void doRealCertRequest(ServiceTransaction trans, String statusString) throws Throwable
Spec says we do the cert request in the authorization servlet.- Specified by:
doRealCertRequest
in classCRServlet
- Parameters:
trans
-statusString
-- Throws:
Throwable
-
setupMPConnection
protected void setupMPConnection(ServiceTransaction trans, String username, String password) throws GeneralSecurityException
- Specified by:
setupMPConnection
in classAbstractAuthorizationServlet
- Throws:
GeneralSecurityException
-
doProxy
protected void doProxy(AbstractAuthorizationServlet.AuthorizedState state) throws Throwable
- Overrides:
doProxy
in classAbstractAuthorizationServlet
- Throws:
Throwable
-
-