MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Connecting to MonoX from query stirng credential   (Mono Support )

Viewed 23090 time(s), 6 post(s) 2/27/2014 5:41:42 PMby logu

Related topics

logu

logu

2/27/2014 5:41:42 PM
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
This content has not been rated yet. 
58 Reputation 7 Total posts
mzilic

mzilic

2/27/2014 5:52:49 PM
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
Rated 5.00, 1 vote(s). 
2218 Reputation 300 Total posts
denis

denis

2/27/2014 6:01:57 PM
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.
Rated 5.00, 1 vote(s). 
7207 Reputation 956 Total posts
logu

logu

2/28/2014 9:30:49 AM
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 
This content has not been rated yet. 
58 Reputation 7 Total posts
idrazic

idrazic

2/28/2014 3:54:43 PM
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
This content has not been rated yet. 
1384 Reputation 152 Total posts
logu

logu

3/5/2014 2:36:31 PM
Hi Igor, 

Thank you, I'll give it a try. 

Regards Logu
This content has not been rated yet. 
58 Reputation 7 Total posts