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) |
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,
KeyPair keyPair,
String canonicalizationMethodType)
Sign an Document at the root
|
void |
signSAMLDocument(Document samlDocument,
KeyPair keypair,
String canonicalizationMethodType)
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 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, KeyPair keyPair, String canonicalizationMethodType) throws ParserConfigurationException, GeneralSecurityException, MarshalException, XMLSignatureException
keyPair
- Key PairParserConfigurationException
XMLSignatureException
MarshalException
GeneralSecurityException
public void signSAMLDocument(Document samlDocument, KeyPair keypair, String canonicalizationMethodType) throws ProcessingException
samlDocument
- keypair
- ProcessingException
public boolean validate(Document signedDocument, PublicKey publicKey) throws ProcessingException
signedDocument
- publicKey
- ProcessingException
Copyright © 2016 JBoss by Red Hat. All rights reserved.