Package edu.uiuc.ncsa.oa2.servlet
Class RFC8628AuthorizationServer
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.uiuc.ncsa.security.servlet.AbstractServlet
-
- org.oa4mp.server.api.servlet.storage.EnvServlet
-
- org.oa4mp.server.proxy.RFC8628AuthorizationServer
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class RFC8628AuthorizationServer extends EnvServlet
Created by Jeff Gaynor
on 2/12/21 at 6:19 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RFC8628AuthorizationServer.PendingState
A class that is used by the authorization server to track user retries.static class
RFC8628AuthorizationServer.TooManyRetriesException
static class
RFC8628AuthorizationServer.UnknownUserCodeException
-
Field Summary
Fields Modifier and Type Field Description static String
USER_CODE_KEY
-
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 RFC8628AuthorizationServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkUser(String username, String password)
protected void
cleanupPending()
void
debugCheckUser(String username, String password)
protected void
doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected String
getFailPage()
protected String
getInitialPage()
protected String
getOkPage()
protected String
getRemoteUserInitialPage()
protected OA2SE
getServiceEnvironment()
void
postprocess(RFC8628AuthorizationServer.PendingState pendingState)
void
prepare(edu.uiuc.ncsa.security.servlet.PresentableState state)
void
present(edu.uiuc.ncsa.security.servlet.PresentableState state)
protected void
processRequest(javax.servlet.http.HttpServletRequest request, RFC8628AuthorizationServer.PendingState pendingState, boolean checkCount)
This is where the user's log in is actually processed and the values they sent are checked.protected void
setClientRequestAttributes(RFC8628AuthorizationServer.PendingState pendingState)
void
storeUpdates()
This will be invoked at init before anything else and should include code to seamlessly upgrade stores from earlier versions.-
Methods inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.EnvServlet
addNotificationListener, loadEnvironment, loadProperties2, 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
-
-
-
-
Field Detail
-
USER_CODE_KEY
public static final String USER_CODE_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInitialPage
protected String getInitialPage()
-
getRemoteUserInitialPage
protected String getRemoteUserInitialPage()
-
getOkPage
protected String getOkPage()
-
getFailPage
protected String getFailPage()
-
storeUpdates
public void storeUpdates() throws IOException, SQLException
Description copied from class:EnvServlet
This will be invoked at init before anything else and should include code to seamlessly upgrade stores from earlier versions. For instance, if a new column needs to be added to a table. This pre-supposes that the current user has the correct permissions to alter the table, btw. This also updates the internal flagEnvServlet.storeUpdatesDone
which should be checks in overrides. If you override this method and call super, let super manage this flag. If it is true, do not execute your method.- Specified by:
storeUpdates
in classEnvServlet
- Throws:
IOException
SQLException
-
getServiceEnvironment
protected OA2SE getServiceEnvironment()
-
prepare
public void prepare(edu.uiuc.ncsa.security.servlet.PresentableState state) throws Throwable
- Throws:
Throwable
-
setClientRequestAttributes
protected void setClientRequestAttributes(RFC8628AuthorizationServer.PendingState pendingState)
-
postprocess
public void postprocess(RFC8628AuthorizationServer.PendingState pendingState) throws Throwable
- Throws:
Throwable
-
doIt
protected void doIt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Throwable
- Specified by:
doIt
in classedu.uiuc.ncsa.security.servlet.AbstractServlet
- Throws:
Throwable
-
processRequest
protected void processRequest(javax.servlet.http.HttpServletRequest request, RFC8628AuthorizationServer.PendingState pendingState, boolean checkCount) throws Throwable
This is where the user's log in is actually processed and the values they sent are checked.- Parameters:
request
-pendingState
-checkCount
-- Throws:
Throwable
-
debugCheckUser
public void debugCheckUser(String username, String password) throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
checkUser
public void checkUser(String username, String password) throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
present
public void present(edu.uiuc.ncsa.security.servlet.PresentableState state) throws Throwable
- Throws:
Throwable
-
cleanupPending
protected void cleanupPending()
-
-