Chapter 31. IDM Usage Scenario

There are two ways to use the jboss idm:

For the 1st case, users need to use the API to start the IdentitySessionFactory, and then use it. The code is as following, which you can find on the example module.

            
IdentitySessionFactory identitySessionFactory = new IdentityConfigurationImpl().
   configure(new File("src/test/resources/example-db-config.xml")).buildIdentitySessionFactory();
IdentitySession identitySession = identitySessionFactory.createIdentitySession("realm://JBossIdentityExample/SampleRealm");            
            
         

And then use the IdentitySession to do the operations etc. So it is very easy to use. We will look closer at the second scenario in the next chapter