13.5.11.3. Configuration
Token Registries are configured through the PicketLinkSTS (Security Token Service configuration) element in the WEB-INF/picketlink.xml file:
Tip
Read the documentation for more information about the Section 13.5.3.6, “Security Token Service Configuration” element and the Section 13.5.3.6, “Security Token Service Configuration” .
<PicketLinkSTS xmlns="urn:picketlink:identity-federation:config:1.0" TokenTimeout="5000" ClockSkew="0"> <TokenProviders> <TokenProvider ProviderClass="org.picketlink.identity.federation.core.saml.v2.providers.SAML20AssertionTokenProvider" TokenType="urn:oasis:names:tc:SAML:2.0:assertion" TokenElement="Assertion" TokenElementNS="urn:oasis:names:tc:SAML:2.0:assertion"> <Property Key="TokenRegistry" Value="org.picketlink.identity.federation.core.sts.registry.JPABasedTokenRegistry" /> </TokenProvider> </TokenProviders> </PicketLinkSTS>
The example above uses a SAML v2 Token Provider configured with the org.picketlink.identity.federation.core.sts.registry.JPABasedTokenRegistry implementation. This is done by the TokenRegistry property.
13.5.11.3.1. org.picketlink.identity.federation.core.sts.registry.FileBasedTokenRegistry
<TokenProvider ProviderClass="org.picketlink.identity.federation.core.saml.v2.providers.SAML20AssertionTokenProvider" TokenType="urn:oasis:names:tc:SAML:2.0:assertion" TokenElement="Assertion" TokenElementNS="urn:oasis:names:tc:SAML:2.0:assertion"> <Property Key="TokenRegistry" Value="FILE" /> <Property Key="TokenRegistryFile" Value="/some/dir/token.registry" /> </TokenProvider>
Use the TokenRegistryFile to specify a file where the tokens should be persisted.