TorrentFlux.com Welcome, Guest. Please login or register.
03-20-2010, 17:14:20
Home Help Search Login Register donate
TorrentFlux Home | TorrentFlux Hosting

+  TorrentFlux Forums
|-+  Code Hacks and Tools
| |-+  TorrentFlux 2.1 Hacks
| | |-+  basic-auth for login
« previous next »
Pages: [1] Go Down Print
Author Topic: basic-auth for login  (Read 2058 times)
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« on: 04-27-2006, 22:06:20 »


for those having their own authentication-systems this may be some nice thing.
i use a single-sign-on-system build upon openldap ("loose" webapps like this integrated with basic-auth + mod_auth_ldap-"proxy"). so this is very nice for me because i dont need that redundant form-login anymore

i keep it to what needs to be done "inside" flux, so nothing about how to setup
your system for this, if you dont know how to do that this is probably nothing for you anyway.

do not do this if you dont know what it exactly does !

the changes are trivial, just replace 2 lines in login.php
find this:
Code:
$user = strtolower(getRequestVar('username'));

$iamhim = addslashes(getRequestVar('iamhim'));

replace with:
Code:
$user = strtolower($_SERVER['PHP_AUTH_USER']);
$iamhim = addslashes($_SERVER['PHP_AUTH_PW']);


regards,
b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
pixluser
Newbie
*
Offline Offline

Posts: 34



View Profile
« Reply #1 on: 05-12-2006, 04:08:56 »

it work very well to login, but, it look like i can't logoff with this mod ?

Logged
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile
« Reply #2 on: 05-12-2006, 04:21:06 »

If you log off from your central login system then it'll remove your main credintials. You will then be able to logoff from TF.
Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #3 on: 05-12-2006, 07:04:20 »

yes thats true, you cant logoff as you know it from form-based flux. you are always "logged in" (your basic auth realm) when seeing any html-snip of your flux when using this.

its as ryaner stated.
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
pixluser
Newbie
*
Offline Offline

Posts: 34



View Profile
« Reply #4 on: 05-12-2006, 07:40:06 »

ok thanx u too
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Powered by PHP