RES: [dev] Gollem Login option

Samuel Mota samuel@gsw.com.br
Thu, 3 Jan 2002 13:32:34 -0200


Hi,

> Chuck added a basic ip based authentication driver to the Auth:: class
> recently that does almost exactly what you did.
> Did you try this one? You find the driver in horde/lib/Auth/ipbasic.php.

I didn't.

I could use it's function addressWithinCIDR() (should I copy it or call from
an driver instance inside gollem?) but not the Driver, I do not want the
user to login into the application framework, just to use Gollem.

I need to be able to validate against IP ranges (with this function) and
domains, I think this is not the case to add domain support to de IPbasic
class, is it?

Please tell me, what would be better and I will do it.

REMEMBER: I want to enable users to use Gollem without login at Horde
Framework (no matter wich Auth driver it is using)

Thanks

Samuel



>From chuck@horde.org Date: Thu,  3 Jan 2002 10:43:36 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 9124 invoked from network); 3 Jan 2002 15:44:16 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 3 Jan 2002 15:44:16 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id BC05E39B4; Thu,  3 Jan 2002 10:43:36 -0500 (EST)
Received: from 192.168.0.128 ( [192.168.0.128])
	as user chuck@localhost by marina.horde.org with HTTP;
	Thu,  3 Jan 2002 10:43:36 -0500
Message-ID: <1010072616.3c347c28962ea@marina.horde.org>
Date: Thu,  3 Jan 2002 10:43:36 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <1010071411.3c347773b4b9e@linux.wg.de>
In-Reply-To: <1010071411.3c347773b4b9e@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [dev] parent:: $this-> and other stuff

Quoting Jan Schneider <jan@horde.org>:

> This doesn't work of course because Horde_sub::bar() (inherited from 
> Horde::bar()) call Horde::foo() instead of Horde_sub::foo(). If this were 
> an object I would write $this->foo() in Horde::bar() and everything would 
> work. Can anybody think of a construct which makes this work with these 
> package style classes also (something like this::foo() which doesn't work 
> of course)?

Horde_sub::foo().

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin


>From chuck@horde.org Date: Thu,  3 Jan 2002 10:44:04 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 9315 invoked from network); 3 Jan 2002 15:44:43 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 3 Jan 2002 15:44:43 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id D487F39FF; Thu,  3 Jan 2002 10:44:04 -0500 (EST)
Received: from 192.168.0.128 ( [192.168.0.128])
	as user chuck@localhost by marina.horde.org with HTTP;
	Thu,  3 Jan 2002 10:44:04 -0500
Message-ID: <1010072644.3c347c44ae7c9@marina.horde.org>
Date: Thu,  3 Jan 2002 10:44:04 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <DJEILBHPPNCLMOPLANCHAEBDJPAA.samuel@gsw.com.br>
In-Reply-To: <DJEILBHPPNCLMOPLANCHAEBDJPAA.samuel@gsw.com.br>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: RES: [dev] Gollem Login option

Quoting Samuel Mota <samuel@gsw.com.br>:

> REMEMBER: I want to enable users to use Gollem without login at Horde
> Framework (no matter wich Auth driver it is using)

Just specify different $conf['auth'] parameters in Gollem's conf.php.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin


>From chuck@horde.org Date: Thu,  3 Jan 2002 10:44:58 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 9549 invoked from network); 3 Jan 2002 15:45:36 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 3 Jan 2002 15:45:36 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 39CCF39B4; Thu,  3 Jan 2002 10:44:58 -0500 (EST)
Received: from 192.168.0.128 ( [192.168.0.128])
	as user chuck@localhost by marina.horde.org with HTTP;
	Thu,  3 Jan 2002 10:44:58 -0500
Message-ID: <1010072698.3c347c7a12073@marina.horde.org>
Date: Thu,  3 Jan 2002 10:44:58 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <20020102133328.E5893473@arkady.horde.org>
In-Reply-To: <20020102133328.E5893473@arkady.horde.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [cvs] cvs commit: imp login.php redirect.php horde/lib Lang.php

Quoting Jan Schneider <jan@ammma.de>:

>   Reintroduce the language cookie, but only for the length of the browser
>   session.

Why?

>   The current language selection scheme is the following:
>   Login screen
>   1) The language selected on the login screen
>   2) The browser's accept-language header
>   3) The default value in $nls
>   After login
>   1) The user's preference
>   2) The preference's default value
>   3) The language selected on the login screen
>   4) The browser's accept-language header
>   5) The default value in $nls

This is far, far too complicated. And I don't see where the re-introduced 
cookie fits in here.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin


>From jan@horde.org Date: Thu,  3 Jan 2002 16:50:41 +0100
Return-Path: <jan@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 9930 invoked from network); 3 Jan 2002 15:51:04 -0000
Received: from mailout06.sul.t-online.com (194.25.134.19)
  by clark.horde.org with SMTP; 3 Jan 2002 15:51:04 -0000
Received: from fwd11.sul.t-online.de 
	by mailout06.sul.t-online.de with smtp 
	id 16MA91-0001rm-0A; Thu, 03 Jan 2002 16:51:03 +0100
Received: from linux.wg.de (320034214675-0001@[217.225.46.126]) by fmrl11.sul.t-online.com
	with esmtp id 16MA8s-1LOleaC; Thu, 3 Jan 2002 16:50:54 +0100
Received: from localhost (localhost [127.0.0.1])
	by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g03Fof917376
	for <dev@lists.horde.org>; Thu, 3 Jan 2002 16:50:41 +0100
Received: from 192.168.60.1 ( [192.168.60.1])
	as user jan@linux by linux.wg.de with HTTP;
	Thu,  3 Jan 2002 16:50:41 +0100
Message-ID: <1010073041.3c347dd10762d@linux.wg.de>
Date: Thu,  3 Jan 2002 16:50:41 +0100
From: Jan Schneider <jan@horde.org>
To: dev@lists.horde.org
References: <DJEILBHPPNCLMOPLANCHAEBDJPAA.samuel@gsw.com.br>
In-Reply-To: <DJEILBHPPNCLMOPLANCHAEBDJPAA.samuel@gsw.com.br>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: RES: [dev] Gollem Login option

Zitat von Samuel Mota <samuel@gsw.com.br>:

> Hi,
> 
> > Chuck added a basic ip based authentication driver to the Auth::
> class
> > recently that does almost exactly what you did.
> > Did you try this one? You find the driver in
> horde/lib/Auth/ipbasic.php.
> 
> I didn't.
> 
> I could use it's function addressWithinCIDR() (should I copy it or call
> from
> an driver instance inside gollem?) but not the Driver, I do not want
> the
> user to login into the application framework, just to use Gollem.

You can make a subclass of Auth_ipbasic to use the method.
 
> I need to be able to validate against IP ranges (with this function)
> and
> domains, I think this is not the case to add domain support to de
> IPbasic
> class, is it?

No, but perhaps you can extend this class do handle domains also. It may be 
problematic to use domain names though because gethostbyaddr() may not work 
because of incaccessible dns servers or timeout problems.
 
> Please tell me, what would be better and I will do it.
> 
> REMEMBER: I want to enable users to use Gollem without login at Horde
> Framework (no matter wich Auth driver it is using)

Probably Chuck can help you further as I don't know his intentions for this 
class.

Jan.

::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::


>From jan@horde.org Date: Thu,  3 Jan 2002 16:52:27 +0100
Return-Path: <jan@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 10465 invoked from network); 3 Jan 2002 16:01:17 -0000
Received: from mailout06.sul.t-online.com (194.25.134.19)
  by clark.horde.org with SMTP; 3 Jan 2002 16:01:17 -0000
Received: from fwd11.sul.t-online.de 
	by mailout06.sul.t-online.de with smtp 
	id 16MAIt-0001rm-08; Thu, 03 Jan 2002 17:01:15 +0100
Received: from linux.wg.de (320034214675-0001@[217.225.46.126]) by fmrl11.sul.t-online.com
	with esmtp id 16MAIb-0useEiC; Thu, 3 Jan 2002 17:00:57 +0100
Received: from localhost (localhost [127.0.0.1])
	by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g03FqR917390
	for <dev@lists.horde.org>; Thu, 3 Jan 2002 16:52:27 +0100
Received: from 192.168.60.1 ( [192.168.60.1])
	as user jan@linux by linux.wg.de with HTTP;
	Thu,  3 Jan 2002 16:52:27 +0100
Message-ID: <1010073147.3c347e3b494df@linux.wg.de>
Date: Thu,  3 Jan 2002 16:52:27 +0100
From: Jan Schneider <jan@horde.org>
To: dev@lists.horde.org
References: <1010071411.3c347773b4b9e@linux.wg.de> <1010072616.3c347c28962ea@marina.horde.org>
In-Reply-To: <1010072616.3c347c28962ea@marina.horde.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [dev] parent:: $this-> and other stuff

Zitat von Chuck Hagenbuch <chuck@horde.org>:

> Quoting Jan Schneider <jan@horde.org>:
> 
> > This doesn't work of course because Horde_sub::bar() (inherited from 
> > Horde::bar()) call Horde::foo() instead of Horde_sub::foo(). If this
> were 
> > an object I would write $this->foo() in Horde::bar() and everything
> would 
> > work. Can anybody think of a construct which makes this work with these
> 
> > package style classes also (something like this::foo() which doesn't
> work 
> > of course)?
> 
> Horde_sub::foo().

Then I wouldn't need two classes but of course I sometime only need Horde 
and call Horde::bar directly. I think I'll forget this and create a 'real' 
class instead.

Jan.

::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::


>From jan@horde.org Date: Thu,  3 Jan 2002 16:55:53 +0100
Return-Path: <jan@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 10497 invoked from network); 3 Jan 2002 16:01:21 -0000
Received: from mailout06.sul.t-online.com (194.25.134.19)
  by clark.horde.org with SMTP; 3 Jan 2002 16:01:21 -0000
Received: from fwd11.sul.t-online.de 
	by mailout06.sul.t-online.de with smtp 
	id 16MAIt-0001rm-0A; Thu, 03 Jan 2002 17:01:15 +0100
Received: from linux.wg.de (320034214675-0001@[217.225.46.126]) by fmrl11.sul.t-online.com
	with esmtp id 16MAIc-0useEkC; Thu, 3 Jan 2002 17:00:58 +0100
Received: from localhost (localhost [127.0.0.1])
	by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g03Ftr917396
	for <dev@lists.horde.org>; Thu, 3 Jan 2002 16:55:53 +0100
Received: from 192.168.60.1 ( [192.168.60.1])
	as user jan@linux by linux.wg.de with HTTP;
	Thu,  3 Jan 2002 16:55:53 +0100
Message-ID: <1010073353.3c347f0983e5d@linux.wg.de>
Date: Thu,  3 Jan 2002 16:55:53 +0100
From: Jan Schneider <jan@horde.org>
To: dev@lists.horde.org
References: <20020102133328.E5893473@arkady.horde.org> <1010072698.3c347c7a12073@marina.horde.org>
In-Reply-To: <1010072698.3c347c7a12073@marina.horde.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [dev] Re: [cvs] cvs commit: imp login.php redirect.php horde/lib Lang.php

Zitat von Chuck Hagenbuch <chuck@horde.org>:

> Quoting Jan Schneider <jan@ammma.de>:
> 
> >   Reintroduce the language cookie, but only for the length of the
> browser
> >   session.
> 
> Why?

The cookie stores the language the user eventually selected on the login 
screen.
 
> >   The current language selection scheme is the following:
> >   Login screen
> >   1) The language selected on the login screen
> >   2) The browser's accept-language header
> >   3) The default value in $nls
> >   After login
> >   1) The user's preference
> >   2) The preference's default value
> >   3) The language selected on the login screen
> >   4) The browser's accept-language header
> >   5) The default value in $nls
> 
> This is far, far too complicated. And I don't see where the re-introduced
> cookie fits in here.

It's not really more complicated than it used to be. The only thing that 
changed is that the language selection on the login screen is now respected 
in certain cases and the order of the rules changed.

Jan.

::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::


>From chuck@horde.org Date: Thu,  3 Jan 2002 11:14:28 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 11264 invoked from network); 3 Jan 2002 16:15:07 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 3 Jan 2002 16:15:07 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 24EA939B4; Thu,  3 Jan 2002 11:14:29 -0500 (EST)
Received: from 192.168.0.128 ( [192.168.0.128])
	as user chuck@localhost by marina.horde.org with HTTP;
	Thu,  3 Jan 2002 11:14:28 -0500
Message-ID: <1010074468.3c348364ebb99@marina.horde.org>
Date: Thu,  3 Jan 2002 11:14:28 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <20020102133328.E5893473@arkady.horde.org> <1010072698.3c347c7a12073@marina.horde.org> <1010073353.3c347f0983e5d@linux.wg.de>
In-Reply-To: <1010073353.3c347f0983e5d@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [dev] Re: [cvs] cvs commit: imp login.php redirect.php horde/lib Lang.php

Quoting Jan Schneider <jan@horde.org>:

> The cookie stores the language the user eventually selected on the login 
> screen.

I know I've missed a lot lately, but is there a reason you need to store this 
seperately instead of processing it in redirect.php?

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin