Mono Support Connecting to MonoX from query stirng credential  

Viewed 45339 time(s), 6 post(s), 2/27/2014 5:41:42 PM - by logu
2/27/2014 5:41:42 PM
58 Reputation 7 Total posts

Hi all!

I am trying to connect to MonoX using credential from the query string : 
    www.mono-software.com/default.aspx?login="mylogin"&pass="MyPassword" 
Does anyone tried or managed to do this? 
Is there a way of doing this ? 

Thanks 

Logu

1
2/27/2014 5:52:49 PM
2218 Reputation 300 Total posts

Hello,

MonoX does not support this out of the box. You would need to implement this functionality yourself. You could on your login page detect the presence of these parameters and try to validate the username and password then login the user. Please have in mind that if you decide to implement such a login it could potentially be easily exploited therefore I would not recommend it.

Regards,
Mario

2
2/27/2014 6:01:57 PM
7207 Reputation 956 Total posts

I agree with Mario that this is not a very good idea and basically defeats the purpose of authentication infrastructure. Everybody will be able to see your passwords, they will be stored in web server log files, etc.

3
2/28/2014 9:30:49 AM
58 Reputation 7 Total posts

Hi guys,

Thanks I get it no login password by query string !
Desperate time call for desperate measures. I am stuck with this problem.
As I explained here : 
http://www.mono-software.com/Mono/Pages/Discussion/dtopic/Uy4tWsEzw0263aK5AQkrtg/Integrating-MonoX-with-another-database/

My goal is to use the group module in MonoX, We have groups in our app where users have a calender and documents that they can download from. We wanted to Implement a wall, MonoX is perfect for us for that purpose. I am trying to create a MonoX group for each group that we have in our app. Once the group is created I could put a link in our apps group page to the corresponding MonoX group. By clicking the link the user can land on the wall. To do that I need to create groups / users  and link them together.
I managed to do so : 
            var group = GroupAdapter.GetInstance().CreateGroup(groupName);
            var user = UserAdapter.GetInstance().CreateUser(adminUserName, passeword, mail);
            GroupAdapter.GetInstance().JoinGroup(group.Id, user.Id);
            GroupRepository.GetInstance().SetGroupMemberAsAdministrator(user.Id,group.Id, true);
 (I would call an asp page [syncAgroup.aspx?groupId=2315] with the id of our group and I'll sync the group and users) 
But when I call the asp page I am not connected to MonoX therefore I can't create any group (GroupAdapter.GetInstance().CreateGroup(groupName); this method is looking for a user_id as the creator of the group) 
I tried something else, I managed to get a custom membership management to work with MonoX using credential from the other webapp but how to get both MonoX and the other webapp to share the session to let know MonoX the logged user?

Thanks for your reply 
Regards 
Logu 

4
2/28/2014 3:54:43 PM
1384 Reputation 152 Total posts

Hi Logu

1) make sure the auth cookie is available for both applications
if you have e.g. app1.mysite.com, monox.mysite.com then cookie domain needs to be *.mysite.com

2) make sure they have the same machine key (to decrypt the cookie)

see more details here: http://msdn.microsoft.com/en-us/library/eb0zx8fc(v=vs.100).aspx

Regards,
Igor

5
3/5/2014 2:36:31 PM
58 Reputation 7 Total posts

Hi Igor, 

Thank you, I'll give it a try. 

Regards Logu

6
This is a demo site for MonoX. Please visit Mono Software for more info.