Search in sources :

Example 1 with AttributeGetRequest

use of edu.uiuc.ncsa.myproxy.oa4mp.oauth2.cm.util.attributes.AttributeGetRequest in project OA4MP by ncsa.

the class RequestFactory method createRequest.

/* ***** Attribute requests */
public static AttributeGetRequest createRequest(AdminClient aSubj, TypeAttribute typeAttribute, ActionGet actionGet, OA2Client cTarget, JSON content) {
    // JSON content = SATFactory.getContent(json);
    if (!content.isArray()) {
        throw new GeneralException("Content must be a list of attributes to get");
    }
    JSONArray array = (JSONArray) content;
    String[] arrayString = (String[]) array.toArray(new String[array.size()]);
    return new AttributeGetRequest(aSubj, cTarget, Arrays.asList(arrayString));
}
Also used : GeneralException(edu.uiuc.ncsa.security.core.exceptions.GeneralException) JSONArray(net.sf.json.JSONArray) AttributeGetRequest(edu.uiuc.ncsa.myproxy.oa4mp.oauth2.cm.util.attributes.AttributeGetRequest)

Aggregations

AttributeGetRequest (edu.uiuc.ncsa.myproxy.oa4mp.oauth2.cm.util.attributes.AttributeGetRequest)1 GeneralException (edu.uiuc.ncsa.security.core.exceptions.GeneralException)1 JSONArray (net.sf.json.JSONArray)1