Hi Jeremy,

http://rifers.org/wiki/display/RIFE/Authentication
http://rifers.org/wiki/display/RIFE/GuideAuthentication
http://rifers.org/docs/usersguide/ch08.html (For some reason, this url isn't working today)

My first problem I ran into is that I have not found the guide/ example on how to do this with the users being stored in a database. The second is that none of the documentation really explain the necessary components and their explanation. So what do I need?

1) Can someone point me in the right direction, either with an example or document, on how to use the database as a backend for users?

http://rifers.org/wiki/display/RIFE/ GuideCookbookAuthentication#GuideCookbookAuthentication- sect1authenticationdbusers

2) Can someone explain to me the necessary components of implementing authentication/authorization in RIFE?

I understand that it can be confusing.

Authentication basically is built on RIFE's stateful Aspect oriented technique that I call behavioral inheritance (and more recent threedimensional flow). This concept is sadly under documented and my books will take care of that in a month or two. What happens is that you put one site structure on top of another one, and you declare variables that need to be watched. When RIFE hits the upper layer, it will detect that the request was intended for the lower layer and preserve all its data over any number of subsequent requests. The logic in the upper layer executes until one of the watched variables gets a value. Then the childTriggered method is executed and your code is able to evaluate the value to indicate whether the logic should stay in the top layer, or if it should fall through and restore the original request.

All what RIFE's authentication relies on, is a string authentication ID, since that's what need to work with child triggers. (http:// rifers.org/docs/api/com/uwyn/rife/authentication/SessionManager.html)

Now RIFE also has a collection of authorization features that rely on Credentials and a CredentialsManager. Credentials are actually an empty interface, they can contain anything, as long as the associated CredentialsManager is able to verify if they are correct and return a user ID. RIFE provides one sub-interface of Credentials, RoleUserCredentials and one implementation of this, RoleUser. The associated manager classes implement the CredentialsManager interface, but also the RoleUserManager interface. The latter provides a lot of additional functionality to actually maintain the users in the back-end store. The rest are concrete memory or database implementations of the managers.

The last part is SessionValidator, it is essentially a bridge between a CredentialsManager and a SessionManager. The validity of a session is often dependent on external attributes which define the context for a valid session that goes beyond a valid session ID. This interface allows you to write optimized queries to speed up the validation of an active authentication session (ie. a single database query instead of having to use the separate manager classes to achieve this). You can find the explanation of it here: http://rifers.org/docs/api/com/uwyn/rife/authentication/ SessionValidator.html

Hope this helps,

Geert

--
Geert Bevin             Uwyn bvba               GTalk: [EMAIL PROTECTED]
"Use what you need"     Avenue de Scailmont 34  Skype: gbevin
http://www.uwyn.com     7170 Manage, Belgium      AIM: geertbevin
gbevin at uwyn dot com  Tel: +32 64 84 80 03   Mobile: +32 477 302 599

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to