Class RFC7523Utils
- java.lang.Object
-
- org.oa4mp.delegation.server.client.RFC7523Utils
-
- All Implemented Interfaces:
RFC7523Constants
public class RFC7523Utils extends Object implements RFC7523Constants
Created by Jeff Gaynor
on 6/5/23 at 10:02 AM
-
-
Field Summary
-
Fields inherited from interface edu.uiuc.ncsa.oa4mp.delegation.oa2.server.RFC7523Constants
ASSERTION, ASSERTION_JWT_BEARER, CILENT_ASSERTION, CILENT_ASSERTION_TYPE, DEFAULT_LIFETIME, GRANT_TYPE_JWT_BEARER
-
-
Constructor Summary
Constructors Constructor Description RFC7523Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static net.sf.json.JSONObject
createBasicJWT(Client client)
Every basic JWT has the same structure.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.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.protected static edu.uiuc.ncsa.security.util.jwk.JSONWebKey
findKey(Client client, String kid)
-
-
-
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.- 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. Note that clients must have a previous trust relationship to do this, or it will fail.- Parameters:
serviceClient
-client
-parameters
-
-
-