Gobliins Gobliins - 26 days ago 20
Java Question

opensaml 2.6 to 3.2 SamlSchema and X509Credential

Hi i am currently porting an app to OpenSAML 3.2 and getting Problems with following:

1- SAMLSchemaBuilder has no getSAMLSchema methods:

Schema schema = SAMLSchemaBuilder.getSAML11Schema();
parserPoolManager.setSchema(schema)


2- The new
org.opensaml.xmlsec.signature.support.SignatureValidator
only accepts
org.opensaml.security.credential.Credential
not
org.opensaml.xml.security.x509.X509Credential


BasicX509Credential publicCredential = new BasicX509Credential();
SignatureValidator.validate(signature, publicCredential);


Can someone help me?

Answer

Quick look on the JavaDoc, it looks like som difference in the constructor and then call getSAMLSchema instead of getSAML11Schema.

For your last question, try using the CredentialSupport class. It has a method for creating a Credential from a X509Certificate. getSimpleCredential

Comments