accessing shibboleth attributes using a guanxi guard
Fri, Jan 29, 2010
I’ve just finished Shibboleth enabling Blackboard so I thought I’d publish a gist on how to access attributes from a Guanxi Guard. The Guard is a simple Servlet Filter that sits in front of your web application and does the Shibboleth or SAML2 handshakes. Once it’s finished, your application has access to the attributes from the Identity Provider that released them. There are two ways to do this. If your code doesn’t have access to the ServletContext, you can extract them from the request headers using this code. If you do have access to the context, you can load up the Pod directly and gain access to the attributes and the raw SAML they came in using the Pod API, using this code. The whole gist is here.