I will need to update this for OpenAM 10.x as with 10.x OpenAM now supports JSON outputs, so the ugly getAttributes function can now be replaced. See http://openam.forgerock.org/doc/dev-guide/index/chap-rest.html