com.sun.xml.wss.saml
Interface Assertion


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
 java.lang.String getAssertionID()
           
 java.lang.String getIssuer()
           
 java.math.BigInteger getMajorVersion()
           
 java.math.BigInteger getMinorVersion()
           
 void setMajorVersion(java.math.BigInteger value)
          Set the saml major version
 void setMinorVersion(java.math.BigInteger value)
          Set the saml minor version
 org.w3c.dom.Element sign(javax.xml.crypto.dsig.DigestMethod digestMethod, java.lang.String signatureMethod, java.security.PublicKey pubKey, java.security.PrivateKey privKey)
          sign the saml assertion (Enveloped Signature)
 org.w3c.dom.Element sign(java.security.PublicKey pubKey, java.security.PrivateKey privKey)
          Sign the SAML Assertion - Enveloped Signature
 org.w3c.dom.Element toElement(org.w3c.dom.Node doc)
          Convert SAML Assertion to org.w3c.dom.Element
 

Method Detail

sign

org.w3c.dom.Element sign(java.security.PublicKey pubKey,
                         java.security.PrivateKey privKey)
                         throws SAMLException
Sign the SAML Assertion - Enveloped Signature

Parameters:
pubKey - A java.security.PublicKey representing the public key used for Signature verification
privKey - A java.security.PrivateKey representing the private key used for Signature calculation. By Default DigestMethod.SHA1 and SignatureMethod.RSA_SHA1 will be used.
Returns:
An org.w3c.dom.Element representation of Signed SAML Assertion
Throws:
SAMLException

sign

org.w3c.dom.Element sign(javax.xml.crypto.dsig.DigestMethod digestMethod,
                         java.lang.String signatureMethod,
                         java.security.PublicKey pubKey,
                         java.security.PrivateKey privKey)
                         throws SAMLException
sign the saml assertion (Enveloped Signature)

Parameters:
digestMethod - DigestMethod to be used
signatureMethod - SignatureMethod to be used.
pubKey - PublicKey to be used for Signature verification
privKey - PrivateKey to be used for Signature calculation
Returns:
An org.w3c.dom.Element representation of Signed SAML Assertion
Throws:
SAMLException

setMajorVersion

void setMajorVersion(java.math.BigInteger value)
Set the saml major version

Parameters:
value - A java.math.BigInteger representing saml major version

setMinorVersion

void setMinorVersion(java.math.BigInteger value)
Set the saml minor version

Parameters:
value - A java.math.BigInteger representing saml minor version

toElement

org.w3c.dom.Element toElement(org.w3c.dom.Node doc)
                              throws XWSSecurityException
Convert SAML Assertion to org.w3c.dom.Element

Parameters:
doc - the context org.w3c.dom.Node for the creation of the resulting Element.
Returns:
org.w3c.dom.Element element representation of SAML Assertion
Throws:
XWSSecurityException

getIssuer

java.lang.String getIssuer()

getAssertionID

java.lang.String getAssertionID()

getMajorVersion

java.math.BigInteger getMajorVersion()

getMinorVersion

java.math.BigInteger getMinorVersion()


Copyright ? 2005 Sun Microsystems, Inc. All Rights Reserved.