|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Assertion
This interface stands for Assertion element. An Assertion is a package
of information that supplies one or more Statement made by an
issuer. There are three kinds of assertions Authentication, Authorization
Decision and Attribute assertion.
<Assertion AssertionID="1124370015917" IssueInstant="2005-08-18T18:30:15.917+05:30"
Issuer="CN=Assertion Issuer,OU=AI,O=Assertion Issuer,L=Waltham,ST=MA,C=US"
MajorVersion="1" MinorVersion="1"
xmlns="urn:oasis:names:tc:SAML:1.0:assertion">
<Conditions NotBefore="2005-08-16T13:21:50.503+05:30"
NotOnOrAfter="2005-08-16T15:21:50.504+05:30"/>
<Subject xmlns="urn:oasis:names:tc:SAML:1.0:assertion">
<NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName">
CN=SAML User,OU=SU,O=SAML User,L=Los Angeles,ST=CA,C=US
</NameIdentifier>
<SubjectConfirmation>
<ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:sender-vouches</ConfirmationMethod>
</SubjectConfirmation>
</Subject>
<Attribute AttributeName="attribute1" AttributeNamespace="urn:com:sun:xml:wss:attribute">
<AttributeValue>ATTRIBUTE1</AttributeValue>
</Attribute>
<Assertion>
| Method Summary | |
|---|---|
Advice |
getAdvice()
Gets the value of the advice property of SAML |
String |
getAssertionID()
Get the SAML Assertion ID for SAML1.0 and SAML1.1 |
Conditions |
getConditions()
Gets the value of the conditions property of SAML |
String |
getID()
Get the SAML Assertion ID for SAML2.0 |
String |
getIssueInstance()
Gets the value of the issueInstant property. |
BigInteger |
getMajorVersion()
Get the SAML Major Vertion for SAML1.0 and SAML1.1 |
BigInteger |
getMinorVersion()
Get the SAML Minor Vertion for SAML1.0 and SAML1.1 |
String |
getSamlIssuer()
Get the issuer of SAML Assertion |
List<Object> |
getStatements()
Return all statements presents in the SAML Assertion. |
Subject |
getSubject()
Gets the value of the subject property of SAML 2.0 This method should be applied only on SAML 2.0 assertion. |
String |
getVersion()
Get the SAML Vertion SAML2.0 |
void |
setMajorVersion(BigInteger value)
Deprecated. Set the saml major version for SAML1.0 and SAML1.1 |
void |
setMinorVersion(BigInteger value)
Deprecated. Set the saml minor version for SAML1.0 and SAML1.1 |
void |
setVersion(String version)
Deprecated. Set the saml version for SAML2.0 |
Element |
sign(DigestMethod digestMethod,
String signatureMethod,
PublicKey pubKey,
PrivateKey privKey)
Sign the SAML Assertion - Enveloped Signature |
Element |
sign(DigestMethod digestMethod,
String signatureMethod,
X509Certificate cert,
PrivateKey privKey)
Sign the SAML Assertion - Enveloped Signature |
Element |
sign(DigestMethod digestMethod,
String signatureMethod,
X509Certificate cert,
PrivateKey privKey,
boolean alwaysIncludeCert)
Sign the SAML Assertion - Enveloped Signature |
Element |
sign(PublicKey pubKey,
PrivateKey privKey)
Sign the SAML Assertion - Enveloped Signature |
Element |
sign(X509Certificate cert,
PrivateKey privKey)
Sign the SAML Assertion - Enveloped Signature |
Element |
sign(X509Certificate cert,
PrivateKey privKey,
boolean alwaysIncludeCert)
Sign the SAML Assertion - Enveloped Signature |
Element |
sign(X509Certificate cert,
PrivateKey privKey,
boolean alwaysIncludeCert,
String signatureMethod,
String canonicalizationMethod)
Sign the SAML Assertion - Enveloped Signature |
Element |
toElement(Node doc)
Convert SAML Assertion to org.w3c.dom.Element |
boolean |
verifySignature(PublicKey pubKey)
Verify the SAML signature with the Public Key |
| Methods inherited from interface com.sun.xml.ws.security.Token |
|---|
getTokenValue, getType |
| Method Detail |
|---|
Element sign(PublicKey pubKey,
PrivateKey privKey)
throws SAMLException
pubKey - A java.security.PublicKey representing the public key used for Signature verificationprivKey - A java.security.PrivateKey representing the private key used for Signature calculation.
By Default DigestMethod.SHA1, SignatureMethod.RSA_SHA1 and CanonicalizationMethod.EXCLUSIVE will be used.
org.w3c.dom.Element representation of Signed SAML Assertion
SAMLException
Element sign(X509Certificate cert,
PrivateKey privKey)
throws SAMLException
cert - A java.security.cert.X509Certificate representing the certificate used for Signature verificationprivKey - A java.security.PrivateKey representing the private key used for Signature calculation.
By Default DigestMethod.SHA1, SignatureMethod.RSA_SHA1 and CanonicalizationMethod.EXCLUSIVE will be used.
org.w3c.dom.Element representation of Signed SAML Assertion
SAMLException
Element sign(X509Certificate cert,
PrivateKey privKey,
boolean alwaysIncludeCert)
throws SAMLException
cert - A java.security.cert.X509Certificate representing the certificate used for Signature verificationprivKey - A java.security.PrivateKey representing the private key used for Signature calculation.alwaysIncludeCert - A flag to tell whether to incude the certificate in the SAML signature.
By Default DigestMethod.SHA1, SignatureMethod.RSA_SHA1 and CanonicalizationMethod.EXCLUSIVE will be used.
org.w3c.dom.Element representation of Signed SAML Assertion
SAMLException
Element sign(X509Certificate cert,
PrivateKey privKey,
boolean alwaysIncludeCert,
String signatureMethod,
String canonicalizationMethod)
throws SAMLException
cert - A java.security.cert.X509Certificate representing the certificate used for Signature verificationprivKey - A java.security.PrivateKey representing the private key used for Signature calculation.alwaysIncludeCert - A flag to tell whether to incude the certificate in the SAML signature.signatureMethod - A javax.xml.crypto.dsig.SignatureMethod representing the signature algorithm used SAML signature.canonicalizationMethod - A javax.xml.crypto.dsig.CanonicalizationMethod representing the canonicalization algorithm used SAML signature.
By Default DigestMethod.SHA1, SignatureMethod.RSA_SHA1 and CanonicalizationMethod.EXCLUSIVE will be used.
org.w3c.dom.Element representation of Signed SAML Assertion
SAMLException
Element sign(DigestMethod digestMethod,
String signatureMethod,
PublicKey pubKey,
PrivateKey privKey)
throws SAMLException
digestMethod - A javax.xml.crypto.dsig.DigestMethod representing the digest method used for SAML signature.signatureMethod - A javax.xml.crypto.dsig.SignatureMethod representing the signature algorithm used SAML signature.pubKey - A java.security.PublicKey representing the public key used for Signature verificationprivKey - A java.security.PrivateKey representing the private key used for Signature calculation.
By Default DigestMethod.SHA1, SignatureMethod.RSA_SHA1 and CanonicalizationMethod.EXCLUSIVE will be used.
org.w3c.dom.Element representation of Signed SAML Assertion
SAMLException
Element sign(DigestMethod digestMethod,
String signatureMethod,
X509Certificate cert,
PrivateKey privKey)
throws SAMLException
digestMethod - A javax.xml.crypto.dsig.DigestMethod representing the digest method used for SAML signature.signatureMethod - A javax.xml.crypto.dsig.SignatureMethod representing the signature algorithm used SAML signature.cert - A java.security.cert.X509Certificate representing the certificate used for Signature verificationprivKey - A java.security.PrivateKey representing the private key used for Signature calculation.
By Default DigestMethod.SHA1, SignatureMethod.RSA_SHA1 and CanonicalizationMethod.EXCLUSIVE will be used.
org.w3c.dom.Element representation of Signed SAML Assertion
SAMLException
Element sign(DigestMethod digestMethod,
String signatureMethod,
X509Certificate cert,
PrivateKey privKey,
boolean alwaysIncludeCert)
throws SAMLException
digestMethod - A javax.xml.crypto.dsig.DigestMethod representing the digest method used for SAML signature.signatureMethod - A javax.xml.crypto.dsig.SignatureMethod representing the signature algorithm used SAML signature.cert - A java.security.cert.X509Certificate representing the certificate used for Signature verificationprivKey - A java.security.PrivateKey representing the private key used for Signature calculation.alwaysIncludeCert - A flag to tell whether to incude the certificate in the SAML signature.
By Default DigestMethod.SHA1, SignatureMethod.RSA_SHA1 and CanonicalizationMethod.EXCLUSIVE will be used.
org.w3c.dom.Element representation of Signed SAML Assertion
SAMLExceptionvoid setMajorVersion(BigInteger value)
value - A java.math.BigInteger representing saml major version.void setMinorVersion(BigInteger value)
value - A java.math.BigInteger representing saml minor version.void setVersion(String version)
version - A java.lang.String representing saml version
Element toElement(Node doc)
throws XWSSecurityException
org.w3c.dom.Element
doc - the context org.w3c.dom.Node for the creation of the resulting org.w3c.dom.Element.
XWSSecurityExceptionString getSamlIssuer()
java.lang.String representing saml issuer.String getAssertionID()
java.lang.String representing saml assertion ID.String getID()
java.lang.String representing saml assertion ID.String getVersion()
java.lang.String representing saml version.BigInteger getMajorVersion()
java.math.BigInteger representing saml major version.BigInteger getMinorVersion()
java.math.BigInteger representing saml minor version.String getIssueInstance()
String representing the issue timestamp of the SAML AssertionList<Object> getStatements()
java.util.List of java.lang.Object
representing all statements present inside the SAML assertion.Conditions getConditions()
Conditions representing conditions of the SAML Assertion.Advice getAdvice()
Advice representing Advice element present in the SAML Assertion.Subject getSubject()
Assertion object, then call
the getSubject() on each statement.
Subject representing Subject of SAML 2.0
boolean verifySignature(PublicKey pubKey)
throws SAMLException
pubKey - A java.security.PublicKey representing the public key used for Signature verification
Boolean representing whether SAML signature verification is successful or not.
SAMLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||