Welcome Guest Search | Active Topics | Log In | Register

Custom Authentication problem Options · View
toddg3s
#1 Posted : Monday, July 21, 2008 10:24:41 PM

Rank: YAF Forumling


Joined: 7/21/2008
Posts: 6
Location: Seattle, WA
I have implemented a custom user class and am using my own forms authentication solution. Everything works great, but whenever someone logs on, they are initially put on a page with this URL: hostname/default.aspx?g=info&i=4. Instead, I want the user to wind up on hostname/default.aspx?g=forum. I've been trying to look through the code to see where this is being assigned, but haven't had any luck so far. In case this was a simple newbie problem, I thought I'd shoot a post out on these boards to see if someone had a quick answer.

I'm running v 1.9.1.8 under .Net 2.0 within IIS (no GoDaddy, DNN, Rainbow, etc.)

Any help would be greatly appreciated.

Todd
Jaben
#2 Posted : Tuesday, July 22, 2008 3:19:37 AM

Rank: YAF Head Dude



Joined: 10/10/2004
Posts: 2,950
Location: Honolulu, HI
How do they log in? If you are using a custom user class then YAF isn't doing any logging in.
"When you are grateful, fear disappears and abundance appears”."

toddg3s
#3 Posted : Tuesday, July 22, 2008 5:32:40 AM

Rank: YAF Forumling


Joined: 7/21/2008
Posts: 6
Location: Seattle, WA
We have an internal authentication system that involves redirecting to a separate server for credentials, then redirecting back to the original URL with a callback ID (encrypted, IP address specific), which is then used to fetch an authentication token. I've traced it all the way through the end of ForumPage_Load in ForumPage.cs, and everything looks fine, then I jump into info.ascx.cs, and I can't seem to figure out how I got there. I'm continuing to work the problem. Like I said, I thought I would just post to see if this was an obvious configuration issue that I missed. If/when I get the solution, I'll post it in this thread.

Todd

P.S. It also seems wierd that even as an administrator I get a message saying "Access Denied" (which I get when I'm directed to default.aspx?g=info&i=4). I would think an administrator is God and can go anywhere.
Jaben
#4 Posted : Tuesday, July 22, 2008 7:22:24 AM

Rank: YAF Head Dude



Joined: 10/10/2004
Posts: 2,950
Location: Honolulu, HI
A Custom User Proxy plugin class supported without resorting to hacking the authentication system might have been preferable:

http://forum.yetanotherf...id-I-do-this-right.aspx
http://forum.yetanotherf...unt-for-the-forums.aspx

Access Denied can pop up if the URL is invalid as well. Your code is redirecting incorrectly somewhere.
"When you are grateful, fear disappears and abundance appears”."

Jaben
#5 Posted : Tuesday, July 22, 2008 7:52:32 AM

Rank: YAF Head Dude



Joined: 10/10/2004
Posts: 2,950
Location: Honolulu, HI
It's probably hitting the "post from a different referring URL" security feature.

When a post is made to YAF via a different referring URL it will give Access Denied.
"When you are grateful, fear disappears and abundance appears”."

toddg3s
#6 Posted : Tuesday, July 22, 2008 10:57:12 AM

Rank: YAF Forumling


Joined: 7/21/2008
Posts: 6
Location: Seattle, WA
There was no hacking involved. I did just what you suggested, implementing my own custom user class and made the configuration change in yafnet.config:

Code:

<CustomUserAssembly>WSSOIntegration.dll</CustomUserAssembly>
<CustomUserClass>WSSOIntegration.WSSOUser</CustomUserClass>


For the authentication, I simply modified web.config, changing the <authentication> tag to:

Code:

<authentication mode="Forms"/>


and adding an http handler:

Code:

<add name="WssoLiteAuthenticationModule" type="Boeing.MIIRS.WssoLiteAuthentication.WssoLiteAuthenticationModule"/>


As I said, this actually works very well, with the exception of the landing page. I made sure to set IsAuthenticated and Name, and when a user logs on for the first time, they are automatically aded to the user table (something I thought I might have to hack).
toddg3s
#7 Posted : Tuesday, July 22, 2008 2:23:19 PM

Rank: YAF Forumling


Joined: 7/21/2008
Posts: 6
Location: Seattle, WA
Jaben wrote:
It's probably hitting the "post from a different referring URL" security feature.

When a post is made to YAF via a different referring URL it will give Access Denied.


Bingo. That did it. Thanks!

Todd
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.3 RC2 | YAF © 2003-2008, Yet Another Forum.NET
This page was generated in 0.132 seconds.

SourceForge.net Logo Powered by ASP.NET v2.0 411ASP.NET