Class AbstractPayloadHandler

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.oa4mp.delegation.server.OA2Scopes

        org.oa4mp.delegation.server.OA2Scopes.ScopeUtil
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected OA2Client client  
      protected OA2SE oa2se  
      protected net.sf.json.JSONObject payload  
      protected javax.servlet.http.HttpServletRequest request  
      protected OA2ServiceTransaction transaction  
      • Fields inherited from interface org.oa4mp.delegation.server.OA2Scopes

        basicScopes, EDU_PERSON_ORC_ID, nonPublicScopes, SCOPE_ADDRESS, SCOPE_CILOGON_INFO, SCOPE_EMAIL, SCOPE_MYPROXY, SCOPE_OFFLINE_ACCESS, SCOPE_OPENID, SCOPE_PHONE, SCOPE_PROFILE, SCOPE_TOKEN_MANAGER, SCOPE_USER_INFO
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractPayloadHandler​(PayloadHandlerConfigImpl payloadHandlerConfig)
      Create the instance for the authorization phase, while there is an HttpServletRequest with possible headers that need to be processed.
    • Field Detail

      • oa2se

        protected OA2SE oa2se
      • request

        protected javax.servlet.http.HttpServletRequest request
      • payload

        protected net.sf.json.JSONObject payload
    • Constructor Detail

      • AbstractPayloadHandler

        public AbstractPayloadHandler​(PayloadHandlerConfigImpl payloadHandlerConfig)
        Create the instance for the authorization phase, while there is an HttpServletRequest with possible headers that need to be processed.
        Parameters:
        payloadHandlerConfig -
    • Method Detail

      • getPhCfg

        public PayloadHandlerConfigImpl getPhCfg()
        Specified by:
        getPhCfg in interface org.oa4mp.delegation.server.jwt.PayloadHandler
      • hasTXRecord

        public boolean hasTXRecord()
      • getTXRecord

        public TXRecord getTXRecord()
      • setExtendedAttributes

        public void setExtendedAttributes​(net.sf.json.JSONObject extendedAttributes)
      • getExtendedAttributes

        public net.sf.json.JSONObject getExtendedAttributes()
        Gets the extended attributes from the current transaction. See OA2ServiceTransaction.getExtendedAttributes() for more.
        Specified by:
        getExtendedAttributes in interface org.oa4mp.delegation.server.jwt.PayloadHandler
        Returns:
      • isEmpty

        protected boolean isEmpty​(String x)
      • execute

        public net.sf.json.JSONObject execute​(org.oa4mp.delegation.server.server.claims.ClaimSource source,
                                              net.sf.json.JSONObject claims)
                                       throws Throwable
        Specified by:
        execute in interface org.oa4mp.delegation.server.jwt.PayloadHandler
        Throws:
        Throwable
      • refresh

        public void refresh()
                     throws Throwable
        Specified by:
        refresh in interface org.oa4mp.delegation.server.jwt.PayloadHandler
        Throws:
        Throwable
      • setPhCfg

        public void setPhCfg​(org.oa4mp.delegation.server.jwt.PayloadHandlerConfig phCfg)
        Specified by:
        setPhCfg in interface org.oa4mp.delegation.server.jwt.PayloadHandler
      • setResponseCode

        public void setResponseCode​(int responseCode)
        Specified by:
        setResponseCode in interface org.oa4mp.delegation.server.jwt.PayloadHandler
      • getResponseCode

        public int getResponseCode()
        Specified by:
        getResponseCode in interface org.oa4mp.delegation.server.jwt.PayloadHandler
      • handleResponse

        public void handleResponse​(edu.uiuc.ncsa.security.util.scripting.ScriptRunResponse resp)
                            throws Throwable
        Specified by:
        handleResponse in interface org.oa4mp.delegation.server.jwt.PayloadHandler
        Throws:
        Throwable
      • listToString

        protected String listToString​(List list)
        A utility to take a list and convert it to a blank delimited string. This is returned by any number of handlers. Note that objects
        Parameters:
        list -
        Returns:
      • hasScript

        public boolean hasScript()
        Specified by:
        hasScript in interface org.oa4mp.delegation.server.jwt.PayloadHandler
      • doServerVariables

        protected void doServerVariables​(net.sf.json.JSONObject targetClaims,
                                         net.sf.json.JSONObject userMetaData)
        Used by access tokens and refresh tokens. This allows for certain substitutions for various server variables.
        Parameters:
        targetClaims -
      • doSubstitution

        protected void doSubstitution​(String key,
                                      net.sf.json.JSONObject targetClaims,
                                      net.sf.json.JSONObject x)
        Do template substitutions for subject, audience, resource and issuer.
        Parameters:
        key -
        targetClaims -
        x -
      • saveState

        public void saveState​(String execPhase)
                       throws Throwable
        Specified by:
        saveState in interface org.oa4mp.delegation.server.jwt.PayloadHandler
        Throws:
        Throwable
      • setPayload

        public void setPayload​(net.sf.json.JSONObject payload)
        Specified by:
        setPayload in interface org.oa4mp.delegation.server.jwt.PayloadHandler