home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / LOGIN.pm < prev    next >
Encoding:
Perl POD Document  |  2003-10-21  |  729 b   |  42 lines

  1. # Copyright (c) 2002 Graham Barr <gbarr@pobox.com>. All rights reserved.
  2. # This program is free software; you can redistribute it and/or
  3. # modify it under the same terms as Perl itself.
  4.  
  5. package Authen::SASL::Perl::LOGIN;
  6.  
  7. use strict;
  8. use vars qw($VERSION @ISA);
  9.  
  10. $VERSION = "1.03";
  11. @ISA     = qw(Authen::SASL::Perl);
  12.  
  13. my %secflags = (
  14.     noanonymous => 1,
  15. );
  16.  
  17. sub _order { 1 }
  18. sub _secflags {
  19.   shift;
  20.   scalar grep { $secflags{$_} } @_;
  21. }
  22.  
  23. sub mechanism { 'LOGIN' }
  24.  
  25. sub client_start {
  26.   my $self = shift;
  27.   '';
  28. }
  29.  
  30. sub client_step {
  31.   my ($self, $string) = @_;
  32.  
  33.   $string =~ /password/i
  34.     ? $self->_call('pass')
  35.     : $string =~ /username/i
  36.       ? $self->_call('user')
  37.       : '';
  38. }
  39.  
  40. 1;
  41.  
  42.