User login muser

11 views
Skip to first unread message

kevin uittenbosch

unread,
Jan 15, 2015, 5:53:10 AM1/15/15
to ariad...@googlegroups.com
Hi muze, 

I have a problem with muser. In my scenario, i have to display the username who created the document.

Some detailed info:
1 user: (superuser)

The user logs into domain1, when object created here, muser displays the username (perfect)

Now, I have the possibility for the user to create an object from domain1 to domain2. so the template will be executed on domain2 and creates the object.

My problem on domain2: muser = public...

This user has on both domains the same rights: read - add - edit - delete.


Auke van Slooten

unread,
Jan 15, 2015, 7:37:45 AM1/15/15
to ariad...@googlegroups.com
On Thursday, January 15, 2015 at 11:53:10 AM UTC+1, kevin uittenbosch wrote:

Some detailed info:
1 user: (superuser)

The user logs into domain1, when object created here, muser displays the username (perfect)

Now, I have the possibility for the user to create an object from domain1 to domain2. so the template will be executed on domain2 and creates the object.

My problem on domain2: muser = public...

I don't know exactly what you are doing, but it seems it might be with the user authentication cookie. When you login to Ariadne, ariadne sets a login/authentication cookie on the current domain. All following requests use this to see who you are. But this cookie is never submitted to other domains. So domain2 doesn't get the cookie and assumes you are not logged in.

There are a number of ways to fix this. In this case, if domain2 is in the same Ariadne installation, you can just use a 'local' url. The function make_local_url() generates a url for the site in domain2 while keeping the current domain1. You'll get a url like:


While this isn't a nice looking url, it does keep the authentication cookie active.

A better way is to use a single-sign on service or central authentication service. This works like OAuth - like 'login with Google/Facebook/Twitter' stuff. We've made a CAS extension for Ariadne, but it isn't opensource. This will allow you to login to domain1 and be automatically logged in to domain2 as well.

~
Auke
Reply all
Reply to author
Forward
0 new messages