Re: [Rife-users] signature issues
May I ask a name attribute for project element in build.xml? Done. Best regards, Geert -- Geert Bevin Uwyn bvba Use what you need Avenue de Scailmont 34 http://www.uwyn.com 7170 Manage, Belgium gbevin[remove] at uwyn dot comTel +32 64 84 80 03 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://www.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] RIFE Authentication
Geert, I am trying to use the logout function of the authentication module. The logout element is defined as: element id=Logout url=logout extends=rife/logout/passthrough/database.xml property name=datasourcedatasource/property property name=authvar_typecookie/property incookie name=rememberid/ outcookie name=rememberid/ flowlink srcexit=logged_out destid=Home/ /element When a I navigate too 'appurl/logout' I get the exception stack trace posted below: [java] Nov 15, 2005 10:56:35 AM com.uwyn.rife.engine.Gate handleRequest [java] SEVERE: Error on host localhost:8999/ [java] java.lang.ClassCastException: java.lang.String [java] at com.uwyn.rife.authentication.elements.DatabaseLogoutPassthrough.initialize(DatabaseLogoutPassthrough.java:28) [java] at com.uwyn.rife.engine.ElementContext.processContext(ElementContext.java:582) [java] at com.uwyn.rife.engine.RequestState.service(RequestState.java:217) [java] at com.uwyn.rife.engine.Gate.handleRequest(Gate.java:422) [java] at com.uwyn.rife.engine.Gate.handleRequest(Gate.java:240) [java] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at com.uwyn.rife.servlet.RifeFilter.doFilter(RifeFilter.java:112) [java] at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:823) [java] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473) [java] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) [java] at org.mortbay.http.HttpContext.handle(HttpContext.java:1565) [java] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:635) [java] at org.mortbay.http.HttpContext.handle(HttpContext.java:1517) [java] at org.mortbay.http.HttpServer.service(HttpServer.java:954) [java] at org.mortbay.http.HttpConnection.service(HttpConnection.java:814) [java] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981) [java] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831) [java] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244) [java] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) [java] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) Any pointers? Thanks, Emmanuel On 11/14/05, Emmanuel Okyere [EMAIL PROTECTED] wrote: Thanks, Emmanuel On 11/14/05, Geert Bevin [EMAIL PROTECTED] wrote: Hi Emmanuel, you can actually set that up with the 'submission_name' property, which defaults to 'credentials'. Best regards, Geert On 14-nov-05, at 13:26, Emmanuel Okyere wrote: OK, i found it... it expects 'credentials' for the submission name. Thanks, Emmanuel -- Geert Bevin Uwyn bvba Use what you need Avenue de Scailmont 34 http://www.uwyn.com 7170 Manage, Belgium gbevin[remove] at uwyn dot comTel +32 64 84 80 03 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://www.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://www.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] RIFE Authentication
I think these errors call for an addition to the property retrieval methods: public T T getPropertyTyped(String name, ClassT type) Which will ensure that the property is in a certain type and throw a meaningful exception if it isn't. On 15-nov-05, at 17:08, Geert Bevin wrote: Hi Emmanuel, you need to set the datasource like this: property name=datasourcedatasourcedatasource/datasource/ property Just as for the authentication element. Best regards, Geert -- Geert Bevin Uwyn bvba Use what you need Avenue de Scailmont 34 http://www.uwyn.com 7170 Manage, Belgium gbevin[remove] at uwyn dot comTel +32 64 84 80 03 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://www.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] Using globalvar as session variable declaration
You can also follow this thread: http://www.uwyn.com/pipermail/rife-users/2005-November/001339.html , which details help i've received from Geert on the authentication module emmanuel On 11/15/05, Emmanuel Okyere [EMAIL PROTECTED] wrote: What would you call a customized mechanism here? The authentication module works beautifully, and allows you to just snap it in/out of your app as you please. I will be glad to lead you through the authentication module, as you are probably facing the very same problems I had when I tried to use it. Can you say specifically how you want to achieve authentication. Emmanuel ps: I am working on a tutorial for it, but it probably won't be ready till about the weekend. On 11/15/05, Eddy Young [EMAIL PROTECTED] wrote: Hi all, I apologise if this question has been posted before, but I cannot find any documentation about globalvar on the website or wiki. From what I've gathered here and there, it seems that globalvar declares what would be the equivalent of a session variable. So, I'm thinking of using it as follows for authentication. Say, I have a member page that requires authentication and have declared account as a globalvar. public class MemberElement extends Element { public void processElement() { Template t = getHtmlTemplate(member); if (getInput(account) == null) { call(login); } print(t); } } public class LoginElement extends Element { public void processElement() { Template t = getHtmlTemplate(login); if (hasSubmission(loginSubmission)) { // perform authentication logic if (authenticated) { setOutput(account, authenticatedAccount); answer(); } } } } Is this a good way of handling authentication? Or should I be using inheritance? If the latter, how do I proceed? I have some difficulty understanding the examples for authentication as those seem memory- or database-centric and not applicable for a customised authentication mechanism. Thank you. Eddy - This mail sent through IMP: http://horde.org/imp/ ___ Rife-users mailing list Rife-users@uwyn.com http://www.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://www.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] Using globalvar as session variable declaration
Quoting Emmanuel Okyere [EMAIL PROTECTED]: What would you call a customized mechanism here? The authentication module works beautifully, and allows you to just snap it in/out of your app as you please. I will be glad to lead you through the authentication module, as you are probably facing the very same problems I had when I tried to use it. Can you say specifically how you want to achieve authentication. Two-factor authentication is one that comes to mind. IIRC, the built-in authentication module caters for only a username/password type of authentication. Also, what if I don't use XML or a database for storing users' details? The archive contains a number of posts about globalvars and sessions. Can we use continuations and globalvars to avoid session variables? Eddy - This mail sent through IMP: http://horde.org/imp/ ___ Rife-users mailing list Rife-users@uwyn.com http://www.uwyn.com/mailman/listinfo/rife-users
[Rife-users] extends and inherits
Can anyone please explain the reason behind having both extends and inherits? These two attributes seem to serve the same purpose. Thanks, Eddy - This mail sent through IMP: http://horde.org/imp/ ___ Rife-users mailing list Rife-users@uwyn.com http://www.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] extends and inherits
Hi Eddy, I'm not sure that will make enough sense, I'll clarify JR's statement a bit. RIFE splits up your site structure in two distinct parts: * declaration * implementation Declaration is the whole site structure itself and implementation is the Java code (or Groovy, Pnuts, Janino, ...) code of each element. When using 'extends', you take the declaration of one particular element and extend upon it. This is mostly for convenience sake and doesn't actually give you much real value beside having a central place of modification and reducing the amount of declaration to write. When using 'inherits' you take the combination of the declaration and the implementation, which I call the behavior, of an element and ensure that it happens before the behavior of another element. This behavior can however be very complex and you should actually see it as layering several site-structures on top of each other. You will stay in the inherited behavior until its associated child trigger condition has been encountered or the child is explicitly triggered. Only then you will 'drop down' to the lower level and execute that behavior. The implementation of this is done is such a way that when a request targets the lower level, and it inherits other behavior in an upper level, the whole context that was sent to the initial element is preserved and even though several request/response cycles might be executed in the upper level, once it drops down to the original child element, the original context will also be restored as if nothing happened. The benefits of this are explained here: http://rifers.org/ blogs/gbevin/2005/3/15/session_timeout_solution So you see that 'inherits' gives you a way to declare cross-concern logic in a way that's not very different from AOP. It offers a lot of new and unique features since you can stack your inheritance declarations and have a real inheritance tree. This is one of the features that you will only find in RIFE afaik. I hope this as clear enough for you, I do tend to over complicate things at time when explaining. Best regards, Geert On 15-nov-05, at 23:29, JR Boyens wrote: You can inherit multiple interfaces, you can only extend one class. On 11/15/05, Eddy Young [EMAIL PROTECTED] wrote: Can anyone please explain the reason behind having both extends and inherits? These two attributes seem to serve the same purpose. -- Geert Bevin Uwyn bvba Use what you need Avenue de Scailmont 34 http://www.uwyn.com 7170 Manage, Belgium gbevin[remove] at uwyn dot comTel +32 64 84 80 03 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://www.uwyn.com/mailman/listinfo/rife-users