public class SAML2Signature extends Object
| Constructor and Description |
|---|
SAML2Signature() |
| Modifier and Type | Method and Description |
|---|---|
static void |
configureIdAttribute(Document document)
Sets the IDness of the ID attribute.
|
static void |
configureIdAttribute(Element element) |
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) |
void |
setX509Certificate(X509Certificate x509Certificate)
Set the
X509Certificate if you desire
to have the SignedInfo have X509 Data
This method needs to be called before any of the sign methods. |
Document |
sign(Document doc,
String referenceID,
String keyName,
KeyPair keyPair,
String canonicalizationMethodType)
Sign an Document at the root
|
void |
signSAMLDocument(Document samlDocument,
String keyName,
KeyPair keypair,
String canonicalizationMethodType)
Sign a SAML Document
|
boolean |
validate(Document signedDocument,
KeyLocator keyLocator)
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 void setX509Certificate(X509Certificate x509Certificate)
X509Certificate if you desire
to have the SignedInfo have X509 Data
This method needs to be called before any of the sign methods.x509Certificate - public Document sign(Document doc, String referenceID, String keyName, KeyPair keyPair, String canonicalizationMethodType) throws ParserConfigurationException, GeneralSecurityException, MarshalException, XMLSignatureException
keyPair - Key PairParserConfigurationExceptionXMLSignatureExceptionMarshalExceptionGeneralSecurityExceptionpublic void signSAMLDocument(Document samlDocument, String keyName, KeyPair keypair, String canonicalizationMethodType) throws ProcessingException
samlDocument - keypair - ProcessingExceptionpublic boolean validate(Document signedDocument, KeyLocator keyLocator) throws ProcessingException
signedDocument - keyLocator - ProcessingExceptionpublic static void configureIdAttribute(Document document)
Sets the IDness of the ID attribute. Santuario 1.5.1 does not assumes IDness based on attribute names anymore. This method should be called before signing/validating a saml document.
document - SAML document to have its ID attribute configured.public static void configureIdAttribute(Element element)
Copyright © 2021 JBoss by Red Hat. All rights reserved.