Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: The plugin schema example was missing the namespace. The example, when it works, is more useful than the previous text.

...

  1. Pick a namespace for the plugin. Do NOT use the urn:mace:shibboleth namespace.
  2. Create the schema file in $PROJ_HOME/resources/schema
    1. Set the targetNamespace to the chosen namespace
    2. Declare any Shibboleth namespaces that will be used via the customary xmlns:PREFIX attributes. At a minimum the namespace associated with the extension point must be declared.
    3. Set the elementFormDefault attribute value to "qualified"
  3. Import the schema file that contains the plugin point being implemented. This is done with the <xsd:import namespace="SHIB_EXT_POINT_NAMESPACE" schemaLocation="classpath:/PATH/TO/YOUR/SCHEMA.xsd" />. Shibboleth defines a special URL scheme, classpath, which ensures that the schema files are resolved from the classpath. No other resolution mechanism is allowed.
  4. Define the plugin type(s) and ensure they extend the appropriate Shibboleth type.
Code Block
xml
titleExample Schema File for an IP-based Login Handler Type
xml
<schema targetNamespace="urn:mace:example.org:shibboleth:authn"
        xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:ph="urn:mace:shibboleth:2.0:idp:profile-handler"
        elementFormDefault="qualified">

    <import namespace="urn:mace:shibboleth:2.0:idp:profile-handler"
		schemaLocation="classpath:/schema/shibboleth-2.0-idp-profile-handler.xsd" />

    <complexType name="IPAddress">
        <complexContent>
            <extension base="ph:LoginHandlerType">
                <sequence>
                    <element name="IPEntry" type="string" maxOccurs="unbounded" />
                </sequence>
                <attribute name="username" type="string" />
            </extension>
        </complexContent>
    </complexType>

</schema>

...