My Shark version is: Shark-1.0-1
First, users and group management
1, the module involved:
User and group management and open, it is also open to external, and the module involved is Sharkapi, Sharkkernel, Sharkusergroup
2. Related database tables:
If the user is stored in the database to the database, the table is used as: useertable, grouptable, usergrouptable, groupgrouptable
3, implementation
Shark Gaosited the external interface is org.enhydra.shark.Api.client.wfservice.usergroupadministration, you can manage users and groups (such as adding, delete, modifying users, etc.) through this interface, and its implementation class is org.enhydra. Shark.usergroupadmin;
The interior of Shark is org.enhydra.shark.Api.internal.usergroup.userGroupManager, other modules in this Shark, such as org.enhydra.shark.userGroupadmin, usergroupadmin itself does not store user data resources (such as tables or LDAP) Delation translation, but through usergroupmanager to implement all the features (this is also the advantage of the interface), UserGroupManager encapsulates the operation of users and groups, everyone can look at the method of UserGroupManager, in module Sharkusergroup, current Shark gave three implementations: doDS, Hibernate, LDAP, I don't say anything, you can look at the source code.
4, my implementation
I have implemented UserGroupManager. I originally wanted to put code, but too long, so I would like to send me an email.
Write the UserGroupManager implementation, the second step, just modify the USERGROUPMANAGROSSNAME = Implement.userGroup.StaticUserGroupManager (your own implementation class). When you call UserGroupAdministration, you can get your user information.
Second, certification management
Because the authentication management also involves the user, it is also analyzed here.
1, the module involved:
Certification management and only open to internal, the module involved is Sharkapi, Sharkauthen
2. Implementation description:
The internal interface given by Shark is org.enhydra.shark.Api.internal.Authentication.AuthenticationManager, only two ways: configure () and validateuser (). CONFIGURE () does not say, everyone knows; validateuser () is used to verify that the user is legal. For the implementation of AuthenticationManager, in the module Sharkauthentication, SHARK is currently three implementations: DODS, Hibernate, LDAP, and everyone looks at the source code. I am a bit confused is that their implementation is not through the usergroupmanager interface, but it is directly operating the table or LDAP to verify the user. Isn't this the principle of such an interface and module design, maybe they are not developing with ordinary people, and At the same time. If you have any better explanation, please tell me. 3, my realization
Strong class recommendation to use UserGroupManager to implement AuthenticationManager, in the same, modify the authenticationManagerClassName = Implement.userGroup.StaticAme = Implement.userGroup.StaticAme = Implement.userGroup.StaticAme = Implement.userGroup.StaticAuthenticationManager. This is called SharkConnection, which is used to verify the user using its own verification class. Mial: Wangxmwxm@163.com