<PicketLink xmlns="urn:picketlink:identity-federation:config:2.1">

  <PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0"
                ServerEnvironment="tomcat" BindingType="POST" SupportsSignatures="true" LogOutPage="/">
    <IdentityURL>${gatein.sso.idp.url}</IdentityURL>
    <ServiceURL>${gatein.sso.sp.url}</ServiceURL>

    <!-- Here are other details related to SAML SP configuration (Like KeyStoreKeyManager etc.) -->
    <!-- ... -->

  </PicketLinkSP>

  <Handlers xmlns="urn:picketlink:identity-federation:handler:config:2.1">
    <Handler
        class="org.picketlink.identity.federation.web.handlers.saml2.SAML2AuthenticationHandler"/>
    <Handler
        class="org.picketlink.identity.federation.web.handlers.saml2.SAML2InResponseToVerificationHandler"/>
    <!-- Other handlers ..... -->
  </Handlers>

  <!-- Start of IDM configuration -->
  <PicketlinkIDM>
    <IdentityManager ClassName="org.picketlink.idm.internal.DefaultIdentityManager" />
    <StoreFactory ClassName="org.picketlink.idm.internal.DefaultStoreFactory" />

    <IdentityStoreInvocationContextFactory ClassName="org.picketlink.idm.internal.DefaultIdentityStoreInvocationContextFactory">
      <!-- EntityManagerFactory is not needed for LDAP testsuite -->
      <!--<EntityManagerFactory></EntityManagerFactory>-->

      <!-- Should be those mandatory? Maybe we can left default impls if not provided here... -->
      <EventBridge ClassName="org.picketlink.idm.internal.NullEventBridge" /> <!-- TODO: This class doesn't exist atm -->
      <CredentialHandlerFactory ClassName="org.picketlink.idm.internal.DefaultIdGenerator" />
      <IdentityCache ClassName="org.picketlink.idm.internal.DefaultIdentityCache" />
      <IdGenerator ClassName="org.picketlink.idm.internal.DefaultIdentityCache" />
    </IdentityStoreInvocationContextFactory>

    <IdentityConfiguration>
      <StoreConfiguration ClassName="org.picketlink.idm.ldap.internal.LDAPConfiguration">
        <Property Name="bindDN" Value="uid=admin,ou=system" />
        <Property Name="bindCredential" Value="secret" />
        <Property Name="ldapURL" Value="ldap://localhost:10389" />
        <Property Name="userDNSuffix" Value="ou=People,dc=jboss,dc=org" />
        <Property Name="roleDNSuffix" Value="ou=Roles,dc=jboss,dc=org" />
        <Property Name="groupDNSuffix" Value="ou=Groups,dc=jboss,dc=org" />
      </StoreConfiguration>

      <!-- More store configurations can be provided... -->
      <StoreConfiguration ClassName="org.picketlink.AnotherStoreConfiguration">

      </StoreConfiguration>

      <!-- Some PartitionStoreConfiguration ... -->
      <PartitionStoreConfiguration ClassName="...">
      </PartitionStoreConfiguration>

    </IdentityConfiguration>

  </PicketlinkIDM>

</PicketLink>
