0 Replies Latest reply on Feb 10, 2016 2:21 PM by f10

    username and credential in one entity (jpa mapped idm)

    f10

      Hi,

       

      I built custom identity model based on picketlink-idm-custom-identity-model, which works fine.

      I have a User, PasswordCredential and TokenCredential entitity.

       

      Now I have a requirement (not my idea) where username and credentials, clear text password (wrote a ClearTextPasswordStorage for that) as well as token, shall be stored in the same User entity/table.

      Can someone give me a hint on howto accomplish that?


      I started writing a class  OneEntityCredentialStore extends JPAIdentityStore and override e.g. storeCredential(), retrieveXXXCredential(), etc.

      Problem I see with this approach is that I cannot annotate my User Entity twice, like with

      @ManagedCredential(ClearTextPasswordStorage.class)

      @ManagedCredential(TokenCredentialStorage.class)

       

      Any help would be appreciated.

       

      cheers