public class SAML2Signature extends Object
| Constructor and Description |
|---|
SAML2Signature() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDigestMethod() |
Node |
getNextSiblingOfIssuer(Document doc) |
String |
getSignatureMethod() |
void |
setDigestMethod(String digestMethod) |
void |
setNextSibling(Node sibling) |
void |
setSignatureIncludeKeyInfo(boolean val)
Set to false, if you do not want to include keyinfo in the signature
|
void |
setSignatureMethod(String signatureMethod) |
Document |
sign(Document doc,
String referenceID,
KeyPair keyPair)
Sign an Document at the root
|
Document |
sign(Document doc,
String idValueOfAssertion,
KeyPair keypair,
String referenceURI)
Sign a document
|
Document |
sign(RequestAbstractType request,
KeyPair keypair)
Sign an RequestType at the root
|
Document |
sign(ResponseType response,
KeyPair keypair)
Sign an ResponseType at the root
|
Document |
sign(ResponseType response,
String idValueOfAssertion,
KeyPair keypair,
String referenceURI)
Sign an assertion whose id value is provided in the response type
|
void |
signSAMLDocument(Document samlDocument,
KeyPair keypair)
Sign a SAML Document
|
boolean |
validate(Document signedDocument,
PublicKey publicKey)
Validate the SAML2 Document
|
public String getSignatureMethod()
public void setSignatureMethod(String signatureMethod)
public String getDigestMethod()
public void setDigestMethod(String digestMethod)
public void setNextSibling(Node sibling)
public void setSignatureIncludeKeyInfo(boolean val)
val - public Document sign(RequestAbstractType request, KeyPair keypair) throws SAXException, IOException, ParserConfigurationException, GeneralSecurityException, MarshalException, XMLSignatureException
request - keypair - Key PairdigestMethod - (Example: DigestMethod.SHA1)signatureMethod - (Example: SignatureMethod.DSA_SHA1)ParserConfigurationExceptionIOExceptionSAXExceptionXMLSignatureExceptionMarshalExceptionGeneralSecurityExceptionpublic Document sign(ResponseType response, KeyPair keypair) throws ParserConfigurationException, GeneralSecurityException, MarshalException, XMLSignatureException
response - keypair - Key PairdigestMethod - (Example: DigestMethod.SHA1)signatureMethod - (Example: SignatureMethod.DSA_SHA1)ParserConfigurationExceptionXMLSignatureExceptionMarshalExceptionGeneralSecurityExceptionpublic Document sign(Document doc, String referenceID, KeyPair keyPair) throws ParserConfigurationException, GeneralSecurityException, MarshalException, XMLSignatureException
response - keyPair - Key PairdigestMethod - (Example: DigestMethod.SHA1)signatureMethod - (Example: SignatureMethod.DSA_SHA1)ParserConfigurationExceptionXMLSignatureExceptionMarshalExceptionGeneralSecurityExceptionpublic Document sign(ResponseType response, String idValueOfAssertion, KeyPair keypair, String referenceURI) throws ParserConfigurationException, XPathException, TransformerFactoryConfigurationError, TransformerException, GeneralSecurityException, MarshalException, XMLSignatureException
response - idValueOfAssertion - keypair - referenceURI - ParserConfigurationExceptionTransformerExceptionTransformerFactoryConfigurationErrorXPathExceptionXMLSignatureExceptionMarshalExceptionGeneralSecurityExceptionpublic Document sign(Document doc, String idValueOfAssertion, KeyPair keypair, String referenceURI) throws ParserConfigurationException, XPathException, TransformerFactoryConfigurationError, TransformerException, GeneralSecurityException, MarshalException, XMLSignatureException
doc - idValueOfAssertion - keypair - referenceURI - ParserConfigurationExceptionXPathExceptionTransformerFactoryConfigurationErrorTransformerExceptionGeneralSecurityExceptionMarshalExceptionXMLSignatureExceptionpublic void signSAMLDocument(Document samlDocument, KeyPair keypair) throws ProcessingException
samlDocument - keypair - ProcessingExceptionpublic boolean validate(Document signedDocument, PublicKey publicKey) throws ProcessingException
signedDocument - publicKey - ProcessingExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.