Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

RT#675 Authorization with Authen::SASL::Perl::External

the EXTERNAL mechanism has only one round trip so that the
authorize-id needs to be send in client_start. client_step will never get
called and can be removed. Also, the noanonymous flag can be set. See
attached patch.

Signed-off-by: Graham Barr <gbarr@pobox.com>
  • Loading branch information...
commit c636a0603732b031d9274e123dd4900749d8d5d9 1 parent 88d55e4
Norbert Klasen authored gbarr committed
Showing with 10 additions and 7 deletions.
  1. +8 −5 lib/Authen/SASL/Perl/EXTERNAL.pm
  2. +2 −2 t/external.t
View
13 lib/Authen/SASL/Perl/EXTERNAL.pm
@@ -8,12 +8,13 @@ package Authen::SASL::Perl::EXTERNAL;
use strict;
use vars qw($VERSION @ISA);
-$VERSION = "1.03";
+$VERSION = "1.04";
@ISA = qw(Authen::SASL::Perl);
my %secflags = (
noplaintext => 1,
nodictionary => 1,
+ noanonymous => 1,
);
sub _order { 2 }
@@ -25,12 +26,14 @@ sub _secflags {
sub mechanism { 'EXTERNAL' }
sub client_start {
- ''
+ my $self = shift;
+ my $v = $self->_call('user');
+ defined($v) ? $v : ''
}
-sub client_step {
- shift->_call('user');
-}
+#sub client_step {
+# shift->_call('user');
+#}
1;
View
4 t/external.t
@@ -20,8 +20,8 @@ my $conn = $sasl->client_new("ldap","localhost", "noplaintext");
is($conn->mechanism, 'EXTERNAL', 'conn mechanism');
-is($conn->client_start, '', 'client_start');
+is($conn->client_start, 'gbarr', 'client_start');
-is($conn->client_step("xyz"), 'gbarr', 'client_step');
+is($conn->client_step("xyz"), undef, 'client_step');
Please sign in to comment.
Something went wrong with that request. Please try again.