Class OA2HeaderUtils


  • public class OA2HeaderUtils
    extends edu.uiuc.ncsa.security.servlet.HeaderUtils
    Utilities for dealing with getting tokens that may be either sent as parameters or in the authorization header . Note that you should check that if a user sends both, that they match and throw an exception if they do not.

    Created by Jeff Gaynor
    on 9/25/17 at 5:33 PM

    • Field Summary

      • Fields inherited from class edu.uiuc.ncsa.security.servlet.HeaderUtils

        BASIC_HEADER, BEARER_HEADER, ID_INDEX, SECRET_INDEX
    • Constructor Summary

      Constructors 
      Constructor Description
      OA2HeaderUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static BaseClient findRFC7523Client​(javax.servlet.http.HttpServletRequest request, OA2SE oa2SE, net.sf.json.JSONObject json)
      Finds the client from the §2.1 JSON RFC7523Constants.CLIENT_ASSERTION-- admin or regular -- and verifies that it is valid, has been approved etc.
      static BaseClient getAndVerifyRFC7523Client​(javax.servlet.http.HttpServletRequest request, OA2SE oa2SE)
      Assumption is that the request has the correct RFC7523Constants.CLIENT_ASSERTION_TYPE of RFC7523Constants.ASSERTION_JWT_BEARER, so we are decoding that.
      static BaseClient getAndVerifyRFC7523Client​(javax.servlet.http.HttpServletRequest request, OA2SE oa2SE, boolean isDeviceFlow)
      Just carries out verifying RFC 7523 §2.1.
      static String getATFromParameter​(javax.servlet.http.HttpServletRequest request)  
      static edu.uiuc.ncsa.security.core.Identifier getIDFromParameters​(javax.servlet.http.HttpServletRequest request)  
      static OA2Client getRFC7523Client​(javax.servlet.http.HttpServletRequest request, OA2SE oa2SE)  
      static void verifyRFC7523Client​(OA2Client client, javax.servlet.http.HttpServletRequest request, OA2SE oa2SE)  
      • Methods inherited from class edu.uiuc.ncsa.security.servlet.HeaderUtils

        getAuthHeader, getBasicHeader, getBearerAuthHeader, getCredentialsFromHeaders, getCredentialsFromHeaders, getFirstParameters, getFirstParameterValue, getIDFromHeaders, getParameters, getSecretFromHeaders, hasBasicHeader, hasBearerHeader, headerToJSON, headerToJSON, throwException