2 Replies Latest reply: Jan 1, 2012 8:03 PM by Shane Bryzak RSS

    Seam 3 Security: datamodel compatible with JpaIdentityStore?

    Karsten Wutzke Expert

      Hello,


      I'm ready to try out Seam 3 Security for one of my projects now, but I have doubts that it can be done. Here's the DB model at hand:


      http://www.kawoolutions.com/media/seam3security-dbmodel-min.png


      Pay special attention to the separate Groups and Users tables, which is nothing special actually. When looking at the docs I can only see a config property in the HTML table for



      identityClass - Entity class that contains identity objects such as users and groups

      Is this compatible with the above model? I can't see how this beans.xml ought to be working:


      <?xml version="1.0"?>
      <beans ...
             xmlns:plidm="urn:java:org.jboss.seam.security.management.picketlink"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://jboss.org/schema/cdi/beans_1_0.xsd">
        
        ...
        
        <plidm:JpaIdentityStoreConfiguration>
          <s:replaces />
          <plidm:identityClass>com.company.project.model.???</plidm:identityClass>
          <plidm:credentialClass>com.company.project.model.User</plidm:credentialClass>
          <!--plidm:relationshipClass>com.company.project.model.Membership</plidm:relationshipClass>
          <plidm:roleTypeClass>com.company.project.model.Role</plidm:roleTypeClass-->
        </plidm:JpaIdentityStoreConfiguration>  
      
      </beans>



      I wonder why the config option identityClass hasn't been separated into userClass and groupClass...


      So, can it be done?


      Thanks
      Karsten