File: external.t

package info (click to toggle)
libauthen-sasl-perl 2.08-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 172 kB
  • ctags: 123
  • sloc: perl: 939; makefile: 34
file content (34 lines) | stat: -rw-r--r-- 596 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

use Authen::SASL;

@Authen::SASL::Plugins = qw(Authen::SASL::Perl);

print "1..5\n";

my $sasl = Authen::SASL->new(
  mechanism => 'EXTERNAL',
  callback => {
    user => 'gbarr',
    pass => 'fred',
    authname => 'none'
  },
) or print "not ";
print "ok 1\n";

$sasl->mechanism eq 'EXTERNAL'
  or print "not ";
print "ok 2\n";

my $conn = $sasl->client_new("ldap","localhost", "noplaintext");

$conn->mechanism eq 'EXTERNAL' or print "not ";
print "ok 3\n";


$conn->client_start eq '' or print "not ";
print "ok 4\n";

$conn->client_step("xyz") eq 'gbarr' or print "not ";
print "ok 5\n";