HttpClient in Scripted Attribute Example

Cantor, Scott cantor.2 at osu.edu
Mon Nov 6 19:38:41 EST 2017


On 11/6/17, 6:19 PM, "users on behalf of Klingenstein, Nate" <users-bounces at shibboleth.net on behalf of nklingenstein at calstate.edu> wrote:

> I've searched everywhere and I can't find a good example for how to make a basic HTTP GET query appropriately from a Scripted
> attribute definition.  Does anyone have any example handy?

It isn't that simple to do, the HttpClient objects don't just have easy "do something" methods, there are various things that have to be done to use them. I don't know easy it is to cook up the necessary objects, and that would be ignoring security. In Java it's pretty simple to copy from some existing code but not from a script.

I actually backported the HTTPConnector to a private library, I can send you a copy if you wanted, but it has to be wired up manually in Spring until 3.4 is done.

I suppose you could do something with the java.net.URL class to do something simple, perhaps.

-- Scott




More information about the users mailing list