ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Net-XMPP2/lib/Net/XMPP2/Error/SASL.pm
Revision: 1.1
Committed: Thu Jul 5 17:33:59 2007 UTC (19 years, 3 months ago) by elmex
Branch: MAIN
CVS Tags: HEAD
Log Message:
fixed some broken links in the documentation and moved errors
to seperate files.

File Contents

# Content
1 package Net::XMPP2::Error::SASL;
2 use Net::XMPP2::Error;
3 our @ISA = qw/Net::XMPP2::Error/;
4
5 =head1 NAME
6
7 Net::XMPP2::Error::SASL - SASL authentication error
8
9 Subclass of L<Net::XMPP2::Error>
10
11 =cut
12
13 sub init {
14 my ($self) = @_;
15 my $node = $self->xml_node;
16
17 my $error;
18 for ($node->nodes) {
19 $error = $_->name;
20 last
21 }
22
23 $self->{error_cond} = $error;
24 }
25
26 =head2 METHODS
27
28 =over 4
29
30 =item B<xml_node ()>
31
32 Returns the L<Net::XMPP2::Node> object for this stream error.
33
34 =cut
35
36 sub xml_node {
37 $_[0]->{node}
38 }
39
40 =item B<condition ()>
41
42 Returns the error condition, which might be one of:
43
44 aborted
45 incorrect-encoding
46 invalid-authzid
47 invalid-mechanism
48 mechanism-too-weak
49 not-authorized
50 temporary-auth-failure
51
52 =cut
53
54 sub condition {
55 $_[0]->{error_cond}
56 }
57
58 sub string {
59 my ($self) = @_;
60
61 sprintf "sasl error: %s",
62 $self->condition
63 }
64
65 =back
66
67 =cut
68
69
70 =head1 AUTHOR
71
72 Robin Redeker, C<< <elmex at ta-sa.org> >>, JID: C<< <elmex at jabber.org> >>
73
74 =head1 COPYRIGHT & LICENSE
75
76 Copyright 2007 Robin Redeker, all rights reserved.
77
78 This program is free software; you can redistribute it and/or modify it
79 under the same terms as Perl itself.
80
81 =cut
82
83 1; # End of Net::XMPP2