[daisy] Programitcally Logging in a user

Karel Vervaeke karel at outerthought.org
Wed Jun 4 16:35:15 CEST 2008


I'm quite sure that it is possible, but I don't know if it has done
before.

Here's a recipe that may help you on your way:

Ingredients:
[0] An authentication service that is able to record tokens that contain
(key, username, timestamp).

[1] A custom authentication scheme (see (0)) that wraps around the Daisy
auth scheme, and the previous authentication scheme.  This way you have
a two-way authentication scheme: one that checks regular logins and one
that checks 

(0) http://cocoondev.org/daisydocs-2_2/373-cd/474-cd/470-cd/471-cd.html

[2] your application.  You already have that - but it should generate a
token when a user logs in and report it to [0] and report the token key
to [3]

[3] A cocoon action: if the user is already logged in, do nothing, else
try to log in the user using the token received by [2] (the hard part
will be to allow this component to identify the user - any ideas
anyone?).

so

 +----------------+
 |[0] auth service|
 +----------------+
        ^     ^         (token)            +--------------------+
        |     +----------------------------|[2] your application|
        |                                  +--------------------+
        v                                          |
 +-----------------------------------+             | (key + username(?))
 |Daisy repo + [1] custom auth scheme|             |
 +-----------------------------------+             v
                 ^                         +--------------------+
                 +-------------------------|daisy wiki + [3]    |
                      (key + username)     +--------------------+



Regards,
Karel

On Tue, 2008-06-03 at 13:02 +0530, Manoj Yadav wrote:
> Hi
> 
> Could someone give me an example of how can we login a user into daisy
> programitcally. Actually I have another application which has its own
> login module. Now once a user logs into my application I want to log
> him into daisy programitcally so that he doesnt have to enter the
> userid and password again . Is this possible using daisy?
> 
> thanks in advance.
> 
> -- 
> Thanks & Regards
> 
> Manoj
> 
> My Corporation
> 
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy


More information about the daisy mailing list