Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

hiddentrue

Note to WRITERS- The following section should be copied to the respective product spaces:

...

This page demonstrates the process of writing a simple custom user store manager for WSO2 products.

In enterprise systems, some key components are centralized for painless management. User management is one such component that is centralized and carefully monitored. There may be user management systems that use a database or LDAP as the datasources. Any WSO2 product based on WSO2 Carbon can be configured to use these existing centralized user management systems as the user store. This topic demonstrates how to integrate an existing JDBC user store with a WSO2 product.

The following sections provide information that you need to be aware of when writing a custom user store manager.

Table of Contents
maxLevel4
minLevel3

...

AbstractUserStoreManager and implementations

...

  1. Copy the artifact of your project (custom-userstore.jar, in this case) to the <PRODUCT_HOME>/repository/components/dropins directory. Also copy all OSGI bundles to this location. If you have any dependency .jar files, copy them to the <PRODUCT_HOME>/repository/components/lib directory.
  2. Change the configuration of the WSO2 product to use our custom implementation for user store management. To do this, open the <PRODUCT_HOME>/repository/conf/user-mgt.xml file and change the UserStoreManager class.

    Code Block
    languagexml
    <UserStoreManager class="com.wso2.custom.usermgt.CustomUserStoreManager">

    You do not need to change anything else since you extend the JDBCUserStoreManager class, so the configurations will remain the same.

    Tip

    Tip: This step provides instructions on configuring your custom user store manager as a primary user store. Alternatively, you can configure this as a secondary user store if you already have a different primary user store configured. See the related topics for For more information configuring user stores in WSO2 products, see Configuring User Stores.

You have now implemented a custom user store manager for a WSO2 product. Once you have done this, start the product and see the log messages that you have placed inside overridden methods when you create a new user or login. This ensures that all your configurations work as intended.

Related topics

...

hiddentrue

...

.

...