Creating a New SAML Object

Creating a new SAML Object requires creating an interface and four classes: a concrete implementation, a builder, a marshaller, and an unmarshaller. The OpenSAML code serve as good examples of these items. Once you have written these items you should refer to the Configuration File section of the manual to see how to configure them for usage.

Create an Interface

The first thing you should do is create an interface for your object. This will allow people to extend/replace your implementation in the future without breaking existing code. Here are the rules we use internally when creating our interfaces:

Create a Concrete Implementation of your Interface

Next you need to create a concrete implementation of your interface. Here are some suggestions for doing that:

Create an Element Builder

Create a class that:

Additional Configuration Information

If your class requires additional configuration information this can be provided in the OpenSAML configuration file; refer to the Extending the !ObjectProvider section for more information.

Next Steps

Next you will need to create a marshaller and unmarshaller for your new object. See the following sections in this manual to do that: