Posted by: aboovk - Monday, 10 March 2008 23:09:54
Hi,
I have a website with a login module.
When a user register with my website, i am creating required records in YAF tables too.
But now i am trying to make a single signup for both my website and for the YAF.
If a user login to the web by using my login page, he should be able to post messages to YAF without login again though the YAF login interface.
Can somebody help on this?
Thanks in advance.
Posted by: Ederon - Tuesday, 11 March 2008 01:43:53
You just need to use same authentication cookie for both application, it's even easier if both your site and forum runs under one. All you need is to make tag in web.config common for both.
Posted by: aboovk - Tuesday, 11 March 2008 10:35:58
Thanks for your reply.
I will try this option.
Aboo
Posted by: guest - Sunday, 16 March 2008 03:14:25
I found this article on this topic:
http://www.developer-corner.com/Resources/KnowledgeBase/tabid/118/articleType/ArticleView/articleId/23/Default.aspx
however, it assumes a lot about the patterns used in the application and does not solve many other integration problems required for a deep integration between YAF and another application context. I am currently working on this problem and don't yet have a coherent solution.
My requirements and constraints are the following:
1. I have my own session objects managing authentication and state.
2. I have my own security.
3. SSO is a small part of creating a coherent user experience between two hosted applications. I don't want duplicate user management nor synchnronization issues with security meta-data.
I don't have any answers at the moment, but I will post some of my findings as I work through my solution. I will be reviewing YAF authentication sequences to see what the implementation is and then decide from there.
CCB
Posted by: aboovk - Sunday, 16 March 2008 03:35:23
May be this is useful.
In my custom login handler I have inserted the following code to populate the YAF session values.
//to populate yaf session
try{
//compute the MD5 password
string sPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(txt_password.Text, "md5");
//create yaf object - You may need to adjust the hardcoded values.
object userID = yaf.DB.user_login(1, txt_user.Text, sPassword);
if (userID != DBNull.Value)
{
//success
string idName = string.Format("{0};{1};{2}", userID, 1, txt_user.Text);
FormsAuthentication.SetAuthCookie(idName,false);
}else{
//Failed
}
}catch (Exception ex){}
Posted by: balochbaahand - Tuesday, 9 December 2008 01:37:49
Hello dear,
I created a website with my own custom login I want the users to automatically login to the forum on my site when they login to my site. You wanted the same , were you able to do it if yes can you please tell me how thanks.
Did anyone solve this please help me with it thanks..
Posted by: mddubs - Tuesday, 9 December 2008 05:31:51
This is how I did it...
I built an ASP.NET 2.0 (or higher) application before I even knew YAF existed. I used Forms Authentication to restrict access to 3 subdirectories; [i]~/guest/[/i], [i]~/member/[/i] and [i]~/admin/[/i].
[i]Guest[/i] is accessible to anyone, logged in or not.
[i]Member[/i] is accessible to my 'Member' or 'Admin' role.
[i]Admin[/i] is accessible only by 'Admin' role.
These permissions are set by adding a custom [i]web.config[/i] file to each directory. If you're unsure how to do this, have Visual Studio do it for you. Select Project -> ASP.NET Configuration -> Security -> Create access rules. Create a rule and it will automatically create a web.config in the appropriate directory which you can then analyze and figure out how it works.
Then, when I discovered YAF, I simply put it into [i]~/members/forum/[/i] and I'm done. My own authentication and login controls are being used and I could basically leave YAF wide-open (although I did go through and define permissions in YAF also).
Posted by: brk08 - Monday, 15 December 2008 21:05:49
[quote=aboovk]Hi,
I have a website with a login module.
When a user register with my website, i am creating required records in YAF tables too.
But now i am trying to make a single signup for both my website and for the YAF.
If a user login to the web by using my login page, he should be able to post messages to YAF without login again though the YAF login interface.
Can somebody help on this?
Thanks in advance.
[/quote]
Hi Aboovk,
Nice to meet you on YAF.
I am also having the same problem you have.
In our website we have one user table where the passwords and usernames will be there same username will be useul to post in the forum.
But I dont no how to get that.
what I must do it and where i must change please let me know and guide me to remove my doubts.
So that i am very grateul to you.
Please help me.