Shared Data Structures for Providers

Provider instances use a shared map to store information and share it with other providers.

All the provider instances are passed a shared map when context-specific methods are invoked. This map can be used by the provider instances to store context-specific information and share it with other providers that need to access it. If providers need to store and share data at the factory level so they can access the data across multiple contexts, they can do so by storing the data in the map indexed with the key ProviderConst.FACTORY_LEVEL_SHARED_STATE.

When using the core provider CertificateValidationLoginModule or CertificateAuthenticationLoginModule, the validated certificate chain is stored in the shared map and available to all the authentication providers using a pre-defined key. Providers can set and retrieve the certificate chain using the key ProviderConst.CERTIFICATE_SHARED_KEY to support certificate authentication principals.

In SAP Mobile Platform, all the client parameters (including personalization parameters as well as the HTTP headers and cookies from the client session) are populated in the shared map passed into the initialize() method. A map is stored in the shared state with the key ProviderConst.HTTP_PROPERTIESCOOKIES_SHARED_KEY. It contains the client parameter names as the keys.