@SuppressWarnings("unchecked")
public void handleRequestType( SAML2HandlerRequest request,
SAML2HandlerResponse response ) throws ProcessingException
{
AuthnRequestType art = (AuthnRequestType) request.getSAML2Object();
HttpSession session = BaseSAML2Handler.getHttpSession(request);
Principal userPrincipal = (Principal) session.getAttribute(GeneralConstants.PRINCIPAL_ID);
List<String> roles = (List<String>) session.getAttribute(GeneralConstants.ROLES_ID);
try
{
Map<String,Object> attribs = (Map<String, Object>) request.getOptions().get(GeneralConstants.ATTRIBUTES);
long assertionValidity = (Long) request.getOptions().get(GeneralConstants.ASSERTIONS_VALIDITY);
String destination = art.getAssertionConsumerServiceURL();
Document samlResponse = this.getResponse(destination,
userPrincipal, roles, request.getIssuer().getValue(),
attribs,
assertionValidity);