[OPEN-ILS-DEV] ofbiz update, questions
Bill Erickson
erickson at esilibrary.com
Fri Aug 17 13:18:57 EDT 2007
I hit a milestone today. I passed in an Evergreen auth token to my OFBiz
test app, created an OFBiz user (UserLogin object) from the EG user data,
and continued with the login process as usual.
I'm taking advantage of two built-in OFBIz capabilities:
1. The preprocessor directive in the application's controller.xml allows you
to perform pre-security logic. In this case, we replace the built-in
LoginWorker with a custom UserManager class which first finds the user
session in the Evergreen instance, creates the OFBiz user if necessary, and
logs the user in. Once the user creation and automatic login has occurred,
we pass control to the built-in LoginWorker code (that we replaced) to
ensure all phases of the login process are completed.
<preprocessor>
<!-- <event type="java" path="org.ofbiz.webapp.control.LoginWorker"
invoke="checkExternalLoginKey"/> -->
<event type="java" path="org.open_ils.woodchip.UserManager"
invoke="checkExternalLoginKey"/>
</preprocessor>
If we agree to continue with this approach, then we will need to update the
<preprocessor>'s for each of the Woodchip apps.
2. framework/security/config/security.xml allows you to plug in a custom
security handler.
<security name="default" class="org.open_ils.woodchip.Security"/>
org/open_ils/woodchip/Security.java sub-classes the default
OFBizSecurity.java implementation and (currently) return 'true' for all
permission queries. Making this Security class perform correct permission
checks is the next phase of integration.
Questions:
1. Is the approach above more or less what everyone was expecting as far as
user integration goes? Thus far, the only data I've duplicated across
systems is the username of the logged in user, which we can force to stay in
sync in the UserManager code at login time, and the user ID, which should
never change.
2. What Java package namespace do we want to use for the custom Java files?
I've been using org.open_ils.woodchip out of laziness.
3. I'm building an application in framework/woodchip. This is where I plan
on putting all of my custom java handling code and utility code. It's also
a good place to put test webapps, or maybe even a portal page of some sort.
Regardless, do we want to continue with building a core woodchip application
(in framework/woodchip) that houses all of the common woodchip code,
templates, properties, etc.?
For the curious, I have a tarball of my test code at
/home/erickson/woodchip-app.tar on acq.open-ils.org. It's not pretty.
-bill
--
Bill Erickson
Equinox Software, Inc.
erickson at esilibrary.com
http://esilibrary.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20070817/8b51ab1f/attachment.html
More information about the Open-ils-dev
mailing list