Class OA4MPServlet

    • Field Detail

      • transactionCleanup

        public static edu.uiuc.ncsa.security.core.cache.Cleanup<String,​BasicTransaction> transactionCleanup
      • lastAccessedThread

        public static edu.uiuc.ncsa.security.storage.events.LastAccessedThread lastAccessedThread
      • kpt

        public static edu.uiuc.ncsa.security.util.pkcs.KeyPairPopulationThread kpt
    • Constructor Detail

      • OA4MPServlet

        public OA4MPServlet()
    • Method Detail

      • createDebugger

        public static edu.uiuc.ncsa.security.core.util.MetaDebugUtil createDebugger​(BaseClient client)
      • verifyAndGet

        public abstract ServiceTransaction verifyAndGet​(IssuerResponse iResponse)
                                                 throws IOException
        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.
        Parameters:
        iResponse -
        Returns:
        Throws:
        IOException
      • 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 flag EnvServlet.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 class EnvServlet
        Throws:
        IOException
        SQLException
      • realStoreUpdates

        protected void realStoreUpdates()
                                 throws IOException,
                                        SQLException
        If you have store updates that need to get done, put them in this method, invoking super. Calls to this are managed by the servlet to make sure nothing get called more than once.
        Throws:
        IOException
        SQLException
      • shutdownCleanup

        protected void shutdownCleanup​(edu.uiuc.ncsa.security.core.cache.Cleanup c)
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Servlet
        Overrides:
        destroy in class javax.servlet.GenericServlet
      • getClient

        public Client getClient​(javax.servlet.http.HttpServletRequest req)
        Assumes that the client identifier is a parameter in the request.
        Parameters:
        req -
        Returns:
      • getGrantIDFromRequest

        protected edu.uiuc.ncsa.security.core.Identifier getGrantIDFromRequest​(javax.servlet.http.HttpServletRequest req)
      • getClient

        public Client getClient​(edu.uiuc.ncsa.security.core.Identifier identifier)
      • getClient

        protected Client getClient​(AuthorizationGrant authorizationGrant)
                            throws IOException
        A utility to get the client from the authorization grant. This looks up the transaction
        Parameters:
        authorizationGrant -
        Returns:
        Throws:
        IOException
      • checkClientApproval

        public void checkClientApproval​(BaseClient client)
        Checks if the client is approved. This should be done before each leg of the process
        Parameters:
        client -
      • isEmpty

        protected boolean isEmpty​(String x)
      • getFirstParameters

        public static Map<String,​String> getFirstParameters​(javax.servlet.http.HttpServletRequest req)
        Utility to extract all of the parameters from a request. Since the parameters are all string arrays, this takes a little finagling. Generally we do not support multiple values for parameters, so taking the first is reasonable.
        Parameters:
        req -
        Returns:
      • getFirstParameterValue

        public String getFirstParameterValue​(javax.servlet.http.HttpServletRequest req,
                                             String key)
        Gets the first values of the parameter with the give key or null if no such value.
        Parameters:
        req -
        key -
        Returns:
      • say

        public void say​(String x)
        Just for low-level debugging.
        Parameters:
        x -
      • checkAdminClientStatus

        public void checkAdminClientStatus​(edu.uiuc.ncsa.security.core.Identifier clientID)
        Given a client id, check if there is an associated admin client and if so, check the status of said admin client. This way if an admin client has been revoked, e.g., all clients are immediately invalidated. This returns no value, it simply throws an exception if the admin client is invalid.
        Parameters:
        clientID -