public class SamlAssertionWrapper extends Object
Constructor and Description |
---|
SamlAssertionWrapper(Element element)
Constructor SamlAssertionWrapper creates a new SamlAssertionWrapper instance.
|
SamlAssertionWrapper(SAMLCallback samlCallback)
Constructor SamlAssertionWrapper creates a new SamlAssertionWrapper instance.
|
SamlAssertionWrapper(org.opensaml.saml.common.SAMLObject samlObject)
Constructor SamlAssertionWrapper creates a new SamlAssertionWrapper instance.
|
Modifier and Type | Method and Description |
---|---|
String |
assertionToString()
Method assertionToString ...
|
void |
checkAudienceRestrictions(List<String> audienceRestrictions)
Check the AudienceRestrictions of the Assertion
|
void |
checkAuthnStatements(int futureTTL)
Check the various attributes of the AuthnStatements of the assertion (if any)
|
void |
checkConditions(int futureTTL)
Check the Conditions of the Assertion.
|
void |
checkIssueInstant(int futureTTL,
int ttl)
Check the IssueInstant value of the Assertion.
|
List<String> |
getConfirmationMethods()
Method getConfirmationMethods returns the confirmationMethods of this
SamlAssertionWrapper object.
|
Element |
getElement()
Get the Assertion as a DOM Element.
|
String |
getId()
Method getId returns the id of this SamlAssertionWrapper object.
|
String |
getIssuerString()
Method getIssuerString returns the issuerString of this SamlAssertionWrapper object.
|
org.opensaml.saml.saml1.core.Assertion |
getSaml1()
Method getSaml1 returns the saml1 of this SamlAssertionWrapper object.
|
org.opensaml.saml.saml2.core.Assertion |
getSaml2()
Method getSaml2 returns the saml2 of this SamlAssertionWrapper object.
|
org.opensaml.saml.common.SAMLObject |
getSamlObject() |
org.opensaml.saml.common.SAMLVersion |
getSamlVersion()
Method getSamlVersion returns the samlVersion of this SamlAssertionWrapper object.
|
org.opensaml.xmlsec.signature.Signature |
getSignature() |
SAMLKeyInfo |
getSignatureKeyInfo()
Get the SAMLKeyInfo associated with the signature of the assertion
|
byte[] |
getSignatureValue()
Get the SignatureValue bytes of the signed SAML Assertion
|
SAMLKeyInfo |
getSubjectKeyInfo()
Get the SAMLKeyInfo associated with the Subject KeyInfo
|
String |
getSubjectName()
Method getSubjectName returns the Subject name value
|
boolean |
isCreated()
Method isCreated returns the created of this SamlAssertionWrapper object.
|
boolean |
isSigned()
Method isSigned returns the signed of this SamlAssertionWrapper object.
|
void |
parseSubject(SAMLKeyInfoProcessor keyInfoProcessor,
Crypto sigCrypto,
CallbackHandler callbackHandler)
This method parses the KeyInfo of the Subject.
|
void |
setSignature(org.opensaml.xmlsec.signature.Signature signature)
Method setSignature sets the signature of this SamlAssertionWrapper object.
|
void |
setSignature(org.opensaml.xmlsec.signature.Signature signature,
String signatureDigestAlgorithm)
Method setSignature sets the signature of this SamlAssertionWrapper object.
|
void |
signAssertion(String issuerKeyName,
String issuerKeyPassword,
Crypto issuerCrypto,
boolean sendKeyValue)
Create an enveloped signature on the assertion that has been created.
|
void |
signAssertion(String issuerKeyName,
String issuerKeyPassword,
Crypto issuerCrypto,
boolean sendKeyValue,
String canonicalizationAlgorithm,
String signatureAlgorithm)
Create an enveloped signature on the assertion that has been created.
|
void |
signAssertion(String issuerKeyName,
String issuerKeyPassword,
Crypto issuerCrypto,
boolean sendKeyValue,
String canonicalizationAlgorithm,
String signatureAlgorithm,
String signatureDigestAlgorithm)
Create an enveloped signature on the assertion that has been created.
|
Element |
toDOM(Document doc)
Create a DOM from the current XMLObject content.
|
void |
validateSignatureAgainstProfile()
Validate the signature of the Assertion against the Profile.
|
void |
verifySignature(SAMLKeyInfo samlKeyInfo)
Verify the signature of this assertion
|
void |
verifySignature(SAMLKeyInfoProcessor keyInfoProcessor,
Crypto sigCrypto)
Verify the signature of this assertion
|
public SamlAssertionWrapper(Element element) throws WSSecurityException
element
- of type ElementWSSecurityException
public SamlAssertionWrapper(org.opensaml.saml.common.SAMLObject samlObject) throws WSSecurityException
samlObject
- of type SAMLObjectWSSecurityException
public SamlAssertionWrapper(SAMLCallback samlCallback) throws WSSecurityException
samlCallback
- of type SAMLCallbackWSSecurityException
public org.opensaml.saml.saml1.core.Assertion getSaml1()
public org.opensaml.saml.saml2.core.Assertion getSaml2()
public boolean isCreated()
public Element toDOM(Document doc) throws WSSecurityException
doc
- of type DocumentWSSecurityException
public String assertionToString() throws WSSecurityException
WSSecurityException
public String getId()
public String getIssuerString()
public String getSubjectName()
public List<String> getConfirmationMethods()
public boolean isSigned()
public void setSignature(org.opensaml.xmlsec.signature.Signature signature)
signature
- the signature of this SamlAssertionWrapper object.public void setSignature(org.opensaml.xmlsec.signature.Signature signature, String signatureDigestAlgorithm)
signature
- the signature of this SamlAssertionWrapper object.signatureDigestAlgorithm
- the signature digest algorithm to usepublic void signAssertion(String issuerKeyName, String issuerKeyPassword, Crypto issuerCrypto, boolean sendKeyValue) throws WSSecurityException
issuerKeyName
- the Issuer KeyName to use with the issuerCrypto argumentissuerKeyPassword
- the Issuer Password to use with the issuerCrypto argumentissuerCrypto
- the Issuer Crypto instancesendKeyValue
- whether to send the key value or notWSSecurityException
public void signAssertion(String issuerKeyName, String issuerKeyPassword, Crypto issuerCrypto, boolean sendKeyValue, String canonicalizationAlgorithm, String signatureAlgorithm) throws WSSecurityException
issuerKeyName
- the Issuer KeyName to use with the issuerCrypto argumentissuerKeyPassword
- the Issuer Password to use with the issuerCrypto argumentissuerCrypto
- the Issuer Crypto instancesendKeyValue
- whether to send the key value or notcanonicalizationAlgorithm
- the canonicalization algorithm to be used for signingsignatureAlgorithm
- the signature algorithm to be used for signingWSSecurityException
public void signAssertion(String issuerKeyName, String issuerKeyPassword, Crypto issuerCrypto, boolean sendKeyValue, String canonicalizationAlgorithm, String signatureAlgorithm, String signatureDigestAlgorithm) throws WSSecurityException
issuerKeyName
- the Issuer KeyName to use with the issuerCrypto argumentissuerKeyPassword
- the Issuer Password to use with the issuerCrypto argumentissuerCrypto
- the Issuer Crypto instancesendKeyValue
- whether to send the key value or notcanonicalizationAlgorithm
- the canonicalization algorithm to be used for signingsignatureAlgorithm
- the signature algorithm to be used for signingsignatureDigestAlgorithm
- the signature Digest algorithm to useWSSecurityException
public void verifySignature(SAMLKeyInfoProcessor keyInfoProcessor, Crypto sigCrypto) throws WSSecurityException
ValidationException
WSSecurityException
public void verifySignature(SAMLKeyInfo samlKeyInfo) throws WSSecurityException
ValidationException
WSSecurityException
public void validateSignatureAgainstProfile() throws WSSecurityException
WSSecurityException
public void parseSubject(SAMLKeyInfoProcessor keyInfoProcessor, Crypto sigCrypto, CallbackHandler callbackHandler) throws WSSecurityException
WSSecurityException
public org.opensaml.saml.common.SAMLVersion getSamlVersion()
public Element getElement()
public SAMLKeyInfo getSignatureKeyInfo()
public SAMLKeyInfo getSubjectKeyInfo()
public byte[] getSignatureValue() throws WSSecurityException
WSSecurityException
public org.opensaml.xmlsec.signature.Signature getSignature() throws WSSecurityException
WSSecurityException
public org.opensaml.saml.common.SAMLObject getSamlObject()
public void checkConditions(int futureTTL) throws WSSecurityException
WSSecurityException
public void checkIssueInstant(int futureTTL, int ttl) throws WSSecurityException
WSSecurityException
public void checkAudienceRestrictions(List<String> audienceRestrictions) throws WSSecurityException
WSSecurityException
public void checkAuthnStatements(int futureTTL) throws WSSecurityException
WSSecurityException
Copyright © 2017 JBoss by Red Hat. All rights reserved.