(RADIATOR) Feature Request: <AuthBy IMAPS>
Karl Gaissmaier
karl.gaissmaier at kiz.uni-ulm.de
Wed Nov 10 17:38:55 CST 2004
Hi Mike,
...
> Actually, I had a look at the Net::IMAP::Simple and Net::IMAP::Simple::SSL
> modules yesterday. If AuthIMAP used them, some features would be lost, such
> as Debug and Timeout, but I note that Mail::IMAPClient has a feature that
> allows the socket to be replaced with, say, an SSL socket, so that may be an
> alternative way to go.
yep, I had now also a deeper look and I think Net::IMAP::Simple...
isn't the proper choice, since there isn't a plain authenticated()
method. The login() method already selects the INBOX mailfolder
and the quit() EXPUNGES also, there isn't a plain LOGOUT cmd.
And I looked a little bit deeper into AuthByIMAP (nearly a plain
copy from your AuthByPOP3). I don't understand why you've
overridden the handle_request() method form AuthGeneric in AuthByPOP3
and not just the findUser().
One reason could be, that you don't like the DEFAULT(n) user
handling in the handle_request, but this could be solved
with a NoDefault initial value.
The second reason could be that you wish to deal yourself
with the missing check attributes, since the POP3/IMAP
delivers naturally no check/reply attributes.
But the problem with your solution is the diverging
handle_request codes in AuthGeneric and a lot of
different AuthBy... modules. If you invent a new
config variable like let me say the already used
'fork' these modules will not do what the documentation
describes.
What is wrong if I would implement a findUser()
method with the following meta code:
sub initialize
{
my ($self) = @_;
$self->SUPER::initialize;
$self->{NoDefault} = 1; # this must explained in the docu!
}
sub findUser {
my ($self, $name, $p) = @_;
$pwd = $p->decodedPassword;
open socket or return (undef, 1)
try to login with name/pwd
close socket
$user = Radius::User->new($name);
if login ok {
$user->get_check->add_attr('Auth-Type','Accept');
else
$user->get_check->add_attr('Auth-Type','Reject');
return $user;
}
Best Regards
Charly
--
Karl Gaissmaier KIZ/Infrastructure, University of Ulm, Germany
Email:karl.gaissmaier at kiz.uni-ulm.de Service Group Network
--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list