cc.saml
Class SAMLAssertion

java.lang.Object
  extended by cc.saml.SAML
      extended by cc.saml.SAMLAssertion
Direct Known Subclasses:
SAMLProtocol

public class SAMLAssertion
extends SAML

Simple examples of coding to the OpenSAML API. Methods here can write and parse each of the three main assertion types: authentication, authorization decision, and attributes.


Constructor Summary
SAMLAssertion()
           
 
Method Summary
 Assertion createStockAttributeAssertion()
          Creates a file whose contents are a SAML attribute assertion.
 Assertion createStockAuthnAssertion()
          Creates a file whose contents are a SAML authentication assertion.
 Assertion createStockAuthzDecisionAssertion()
          Creates a file whose contents are a SAML authorization-decision assertion.
private static void die()
           
static void main(java.lang.String[] args)
          Parse the command line for instructions to write or read one of the three types of assertions and for a target filename.
 void readAttributeAssertion(java.lang.String filename)
          Parses a SAML attribute assertion as found in a file, and prints out all attributes.
 void readAuthnAssertion(java.lang.String filename)
          Parses a SAML authentication assertion as found in a file, and prints out information about issuer, subject, and authentication context.
 void readAuthzDecisionAssertion(java.lang.String filename)
          Parses a SAML authorization-decision assertion as found in a file, and prints out the essential information.
 
Methods inherited from class cc.saml.SAML
addAttribute, addToElement, asDOMDocument, create, createAssertion, createAttributeAssertion, createAuthnAssertion, createResponse, createResponse, createResponse, createResponse, createSubject, fromElement, printToFile, readFromFile, spawnIssuer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAMLAssertion

public SAMLAssertion()
Method Detail

die

private static void die()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Parse the command line for instructions to write or read one of the three types of assertions and for a target filename. Dispatch to one of the six command methods on this class.

Throws:
java.lang.Exception

createStockAuthnAssertion

public Assertion createStockAuthnAssertion()
                                    throws java.lang.Exception
Creates a file whose contents are a SAML authentication assertion.

Throws:
java.lang.Exception

readAuthnAssertion

public void readAuthnAssertion(java.lang.String filename)
                        throws java.lang.Exception
Parses a SAML authentication assertion as found in a file, and prints out information about issuer, subject, and authentication context.

Throws:
java.lang.Exception

createStockAttributeAssertion

public Assertion createStockAttributeAssertion()
                                        throws java.lang.Exception
Creates a file whose contents are a SAML attribute assertion.

Throws:
java.lang.Exception

readAttributeAssertion

public void readAttributeAssertion(java.lang.String filename)
                            throws java.lang.Exception
Parses a SAML attribute assertion as found in a file, and prints out all attributes.

Throws:
java.lang.Exception

createStockAuthzDecisionAssertion

public Assertion createStockAuthzDecisionAssertion()
                                            throws java.lang.Exception
Creates a file whose contents are a SAML authorization-decision assertion.

Throws:
java.lang.Exception

readAuthzDecisionAssertion

public void readAuthzDecisionAssertion(java.lang.String filename)
                                throws java.lang.Exception
Parses a SAML authorization-decision assertion as found in a file, and prints out the essential information.

Throws:
java.lang.Exception