Class RFC7523Utils

    • Constructor Detail

      • RFC7523Utils

        public RFC7523Utils()
    • Method Detail

      • doPost

        public static String doPost​(edu.uiuc.ncsa.security.servlet.ServiceClient serviceClient,
                                    Client oa2Client,
                                    URI accessTokenEndpoint,
                                    String keyID,
                                    Map parameters)
        Does a POST to the endpoint using the client's key. This fuilfills RFC 7523's section 2.2, authentication using a JWT. This returns a string (a JSON object) since there are various checks that can/should be done on the response, but not necessarily immediately.
        Parameters:
        serviceClient -
        oa2Client -
        accessTokenEndpoint -
        parameters -
        Returns:
      • createBasicJWT

        protected static net.sf.json.JSONObject createBasicJWT​(Client client)
        Every basic JWT has the same structure. Create it here.
        Parameters:
        client -
        Returns:
      • findKey

        protected static edu.uiuc.ncsa.security.util.jwk.JSONWebKey findKey​(Client client,
                                                                            String kid)
      • doTokenRequest

        public static String doTokenRequest​(edu.uiuc.ncsa.security.servlet.ServiceClient serviceClient,
                                            Client client,
                                            URI tokenEndpoint,
                                            String kid,
                                            Map parameters)
        Creates an authorization grant for the client as per RFC 7523 section 2.1. Note that clients must have a previous trust relationship to do this, or it will fail.
        Parameters:
        serviceClient -
        client -
        parameters -