public HandleServiceSAML( String domain, String AAurl, String HSname,
String KSpath, String KSpass, String KSkeyalias,
String KSkeypass, String certalias )
- throws SAMLException, KeyStoreException, Exception
+ throws SAMLException, KeyStoreException, IOException, FileNotFoundException, Exception
{
this.domain = domain;
this.AAurl = AAurl;
ks.load( fis, KSpass.toCharArray());
privateKey = (PrivateKey)ks.getKey(KSkeyalias, KSkeypass.toCharArray());
cert =(X509Certificate)ks.getCertificate(certalias);
-
spp = ShibPOSTProfileFactory.getInstance( policies, HSname );
}
new QName(org.opensaml.XML.SAMLP_NS,"AttributeQuery") );
SAMLResponse r = spp.prepare
( shireURL, handle, domain, clientAddress, authMethod,
- authInstant, bindings, null, null, null, null
+ authInstant, bindings, privateKey, cert, null, null
);
byte[] buf = r.toBase64();
throw new ServletException("Cannot find Handle Service name in init parameters");
}
if ( getInitParameter("KSpath") == null ||
- getInitParameter("AAurl").equals("")) {
+ getInitParameter("KSpath").equals("")) {
throw new ServletException("Cannot find path to KeyStore file in init parameters");
}
if ( getInitParameter("KSpass") == null ||
throw new ServletException("Cannot find password to KeyStore in init parameters");
}
if ( getInitParameter("KSkeyalias") == null ||
- getInitParameter("AAurl").equals("")) {
+ getInitParameter("KSkeyalias").equals("")) {
throw new ServletException("Cannot find private key alias to KeyStore in init parameters");
}
if ( getInitParameter("KSkeypass") == null ||
createForm( req, res, buf );
}
catch (HandleException ex) {
+ System.out.println(ex);
handleError( req, res, ex );
}