To implement the com.ibm.wsspi.security.wim.CustomRepository service
programming interface (SPI) by using the developer tools, you must make the SPI files available to
your projects.
Procedure
- Add the Liberty runtime environment to
Eclipse.
In the Eclipse preferences, go to , and click Add. You can reference an existing Liberty runtime environment or install a new
one.
- Verify that the Application Security 2.0 (appSecurity-2.0) and Federated
Registry 1.0 (federatedRegistry-1.0) features are installed in the Liberty runtime environment.
To list installed features, in the Runtime Explorer view, right-click the
Liberty runtime environment and click
Properties. If either feature is not installed, right-click the Liberty runtime environment, click
Install Additional Content, and select the missing features. For more
information, see Installing assets using developer tools.
- Create an OSGi bundle project where you are implementing the interface. To create the project,
go to , select OSGi Bundle Project, and define the project.
- Verify that the target definition includes the SPI location.
In the Eclipse preferences, go to . Either choose the WebSphere Application Server Liberty with
SPI target definition, or edit the locations for the WebSphere Application
Server Liberty target definition to include the wlp/dev/spi/ibm
location for your runtime environment.
- Add the SPI packages to the project manifest.
In the
Enterprise Explorer view, click
Manifest.
Click the
Dependencies tab and add the following packages in the
Imported Packages section:
- com.ibm.wsspi.security.wim
- com.ibm.wsspi.security.wim.exception
- com.ibm.wsspi.security.wim.model
- Create the class that implements the custom repository interface.
To create the class, in the Enterprise Explorer view, right-click the
src folder in the bundle, and select . Define the properties for your class. For the Interfaces
field, click Add and select the CustomRepository
interface.
What to do next
Implement the custom repository interface, and then package the class as described in
Developing a custom user repository for Liberty.