RE: Multiple authentication methods

2002-02-14 Thread Per Einar Ellefsen
At 17:21 13.02.2002 -0600, you wrote: File::Spec is in included with the standard perl mods I believe so dependencies shouldn't be a problem. I see. You're right, this is actually much nicer! Sorry for the misinformation. On debian it return : also. I made a mistake checking it. But

Re: Multiple authentication methods

2002-02-14 Thread Marcel Weber
Hi Darren Would you submit the current version? If you need help with the Documentation just let me know. For the makefile, I do not have any experience. Marcel Am Mittwoch den, 13. Februar 2002, um 21:01, schrieb darren chamberlain: Quoting Marcel Weber [EMAIL PROTECTED] [13 Feb-02

Re: Multiple authentication methods

2002-02-13 Thread darren chamberlain
Quoting Marcel Weber [EMAIL PROTECTED] [12 Feb-02 16:15]: I don't get the point why it did not work the other way round, but now everything is just fine now : Make it a little more generic: package Apache::MultiAuthen; use strict; use Apache::Constants qw(:common); sub handler { my $r =

Re: Multiple authentication methods

2002-02-13 Thread Aaron Ross
shouldn't stacked handlers be the right solution here? are stacked auth handlers not allowed or something? aaron On Wed, 2002-02-13 at 09:02, darren chamberlain wrote: Quoting Marcel Weber [EMAIL PROTECTED] [12 Feb-02 16:15]: I don't get the point why it did not work the other way round,

Re: Multiple authentication methods

2002-02-13 Thread darren chamberlain
Quoting Aaron Ross [EMAIL PROTECTED] [13 Feb-02 09:21]: shouldn't stacked handlers be the right solution here? are stacked auth handlers not allowed or something? Assuming your mod_perl has been built with them, then, yes, that's probably a better solution. But I had a fun 15 minutes writing

RE: Multiple authentication methods

2002-02-13 Thread Stathy G. Touloumis
He wants to check a 'handler' return value. shouldn't stacked handlers be the right solution here? are stacked auth handlers not allowed or something? aaron On Wed, 2002-02-13 at 09:02, darren chamberlain wrote: Quoting Marcel Weber [EMAIL PROTECTED] [12 Feb-02 16:15]: I don't get

Re: Multiple authentication methods

2002-02-13 Thread Geoffrey Young
Aaron Ross wrote: shouldn't stacked handlers be the right solution here? are stacked auth handlers not allowed or something? yes, you can stack multiple auth handlers. the only problem is that, for the PerlAuthenHandler and PerlAuthzHandler the first handler to return an Apache error

Re: Multiple authentication methods

2002-02-13 Thread Geoffrey Young
the only problem is that, for the PerlAuthenHandler and PerlAuthzHandler the first handler to return an Apache error code (anything other than OK, DECLINED, or DONE) terminates the chain. which is generally fine, except when you want to return AUTH_REQUIRED and note_basic_auth_failure().

Re: Multiple authentication methods

2002-02-13 Thread Marcel Weber
Fixed some errors. Here comes the working version: - package Apache::AuthMulti; # Stathy G. Touloumis # Marcel M. Weber # Darren Chamberlain # # Version 0.1.0 / 2002.02.13 / Marcel M. Weber use strict; use Apache::Constants qw(:common); sub handler { my $r = shift;

Re: Multiple authentication methods

2002-02-13 Thread darren chamberlain
Quoting Marcel Weber [EMAIL PROTECTED] [13 Feb-02 14:53]: Why not submitting this somewhere? I think this could be usefull for quite a lot of people. I think this is cool, as you do not have to worry wether the module returns DECLINED or AUTH_REQUIRED. I can package this up and put it on

Re: Multiple authentication methods

2002-02-13 Thread Geoffrey Young
Marcel Weber wrote: Fixed some errors. Here comes the working version: untested I think you might need to iterate through $r-err_headers_out and remove WWW-Authenticate and Proxy-Authenticate after each authentication module runs. say you have an AuthSMB and AythSybase chain. AuthSMB

Re: Multiple authentication methods

2002-02-13 Thread Geoffrey Young
untested I think you might need to iterate through $r-err_headers_out and remove WWW-Authenticate and Proxy-Authenticate after each authentication module runs. say you have an AuthSMB and AythSybase chain. AuthSMB calls note_basic_auth_failure and sets the WWW-Authenticate header,

RE: Multiple authentication methods

2002-02-13 Thread Stathy G. Touloumis
Some more fixes ; ) I would suggest changing the PerlSetVar variables to actual apache configuration directives which would change this : my @auth_modules=$r-dir_config-get(AuthModules); I don't have an immediate patch for this but have done it before. If you would like me to work on this code

Re: Multiple authentication methods

2002-02-13 Thread darren chamberlain
Quoting Stathy G. Touloumis [EMAIL PROTECTED] [13 Feb-02 15:26]: Some more fixes ; ) Yay! Bug reports already... I would suggest changing the PerlSetVar variables to actual apache configuration directives which would change this : my @auth_modules=$r-dir_config-get(AuthModules); I

RE: Multiple authentication methods

2002-02-13 Thread Stathy G. Touloumis
I would suggest changing the PerlSetVar variables to actual apache configuration directives which would change this : my @auth_modules=$r-dir_config-get(AuthModules); I don't have an immediate patch for this but have done it before. If you would like me to work on this code no

RE: Multiple authentication methods

2002-02-13 Thread Stathy G. Touloumis
The easiest thing would be to use Config, and do: $module =~ s[::][$Config{'path_sep'}]g; Right? Maybe not : ) When checking on 2 linux systems I got a path seperator of ':'. Can you let me know if you get similar results? Thanks,

Re: Multiple authentication methods

2002-02-13 Thread Marcel Weber
So here comes the most actual code: Submitting it to CPAN would be fine! package Apache::AuthMulti; # Stathy G. Touloumis # Marcel M. Weber # Darren Chamberlain # # Version 0.01-2 / 13.02.2002 / Marcel M. Weber use strict; use

Re: Multiple authentication methods

2002-02-13 Thread Marcel Weber
On my woody system it's fine. Marcel Am Mittwoch den, 13. Februar 2002, um 23:51, schrieb Stathy G. Touloumis: The easiest thing would be to use Config, and do: $module =~ s[::][$Config{'path_sep'}]g; Right? Maybe not : ) When checking on 2 linux systems I got a path seperator of

RE: Multiple authentication methods

2002-02-13 Thread Per Einar Ellefsen
At 16:51 13.02.2002 -0600, Stathy G. Touloumis wrote: The easiest thing would be to use Config, and do: $module =~ s[::][$Config{'path_sep'}]g; Right? Maybe not : ) When checking on 2 linux systems I got a path seperator of ':'. Can you let me know if you get similar results? I'm

Re: Multiple authentication methods

2002-02-13 Thread Marcel Weber
Sorry, this code does not work... Should test it better before sending it to to mailing list... Marcel Am Donnerstag den, 14. Februar 2002, um 00:05, schrieb Marcel Weber: So here comes the most actual code: Submitting it to CPAN would be fine!

RE: Multiple authentication methods

2002-02-13 Thread Stathy G. Touloumis
Cool . . . Thanks for the tip : ) The easiest thing would be to use Config, and do: $module =~ s[::][$Config{'path_sep'}]g; Right? Maybe not : ) When checking on 2 linux systems I got a path seperator of ':'. Can you let me know if you get similar results? I'm getting

Re: Multiple authentication methods

2002-02-13 Thread Marcel Weber
I see. You're right, this is actually much nicer! Sorry for the misinformation. On debian it return : also. I made a mistake checking it. But with the suggested code by Per it works just fine: sub load { my $module=@_[0]; $module = File::Spec-catfile(split /::/, $module);

RE: Multiple authentication methods

2002-02-13 Thread Stathy G. Touloumis
File::Spec is in included with the standard perl mods I believe so dependencies shouldn't be a problem. I see. You're right, this is actually much nicer! Sorry for the misinformation. On debian it return : also. I made a mistake checking it. But with the suggested code by Per it works

Re: Multiple authentication methods

2002-02-12 Thread Aaron Ross
Location /test AuthName Test AuthType Basic PerlSetVar myPDC SAMBA PerlSetVar myDOMAIN ARBEITSGRUPPE PerlAuthenHandler Apache::AuthenSmb Apache::AuthSybase require valid-user /Location is mod_perl compiled with STACKED HANDLERS? the first module to run will need to

RE: Multiple authentication methods

2002-02-12 Thread Stathy G. Touloumis
The get_handlers code is out of AuthenSmb as I do not have the slightest idea of how to get the results of the called function. Hmmm, It would seem that it would be better to call the function directly from your handler. I am not sure how the AuthenSmb handlers should be called but you should

RE: Multiple authentication methods

2002-02-12 Thread Stathy G. Touloumis
. Marcel -Ursprüngliche Nachricht- Von: Stathy G. Touloumis [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 12. Februar 2002 18:32 An: Marcel Weber; [EMAIL PROTECTED] Betreff: RE: Multiple authentication methods The get_handlers code is out of AuthenSmb as I do not have the slightest

RE: Multiple authentication methods

2002-02-12 Thread Stathy G. Touloumis
:[EMAIL PROTECTED]] Gesendet: Dienstag, 12. Februar 2002 18:32 An: Marcel Weber; [EMAIL PROTECTED] Betreff: RE: Multiple authentication methods The get_handlers code is out of AuthenSmb as I do not have the slightest idea of how to get the results of the called function. Hmmm, It would