FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Cross-authentication the other way around
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Cross-authentication the other way around [message #23624] Thu, 24 March 2005 13:53 Go to next message
gstaniak is currently offline  gstaniak   Poland
Messages: 2
Registered: March 2005
Karma: 0
Junior Member
Hello,

I downloaded and installed the forum a few days ago, and I'd like to ask about the possibility of integrating it into a website, just like in the "Single Sign-on" topic - but the other way around. I don't use a CMS, but I have a few password-protected directories. Normally, I would use the standard Apache .htpasswd feature for less important stuff, or possibly write a PEAR-based authentication function for more sensitive documents. Now I'd like to integrate the password-protection with FUDForum - however, not like in the case of CMS integration, where the CMS would do the authentication part and then notify FUDForum by including and using the user_login() function, but on the contrary: I would like to include a function in otherwise plain HTML documents so that they would authenticate a user against the forum's database. Is that possible, and has anyone done that before? I'd be very grateful for a push in the right direction. Thanks.


--
Grzegorz Staniak <gstaniak(at)wp(dot)pl>
Re: Cross-authentication the other way around [message #23625 is a reply to message #23624] Thu, 24 March 2005 13:59 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You cannot include PHP code inside plain html. So you need to rename the plain html file to a .php file and have it execute the login function.

FUDforum Core Developer
Re: Cross-authentication the other way around [message #23636 is a reply to message #23625] Thu, 24 March 2005 18:44 Go to previous messageGo to next message
gstaniak is currently offline  gstaniak   Poland
Messages: 2
Registered: March 2005
Karma: 0
Junior Member
Hello,

Yes, I can Wink I've been regularly using Apache's <Files> directive to selectively change the MIME type of chosen documents to application/x-httpd-php - it's a bit risky if you don't control the configuration of the webserver (once the <Files> block gets deleted, visitors will see the PHP code), but otherwise helps to conceal the presence of PHP in served documents.

Anyway, thanks for the tip. I'll have a look at the login() function. I understant that I have to include the forum's globals file, then call login()? Will the function present a form to the user if he/she is not logged on yet, or do I take care of it myself?



--
Grzegorz Staniak <gstaniak(at)wp(dot)pl>
Re: Cross-authentication the other way around [message #23640 is a reply to message #23636] Thu, 24 March 2005 22:00 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
As of FUDforum 2.6.12 there is a special script inside the scripts/ directory called forum_login.php that implements external_fud_login() function that given a forum user id will log that user in.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 2 FUDForum applications, 1 database
Next Topic: changing colors
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 13:57:40 GMT 2024

Total time taken to generate the page: 0.02663 seconds