AnyEvent::XMPP::Error::IQAuth - IQ authentication error


AnyEvent-XMPP documentation Contained in the AnyEvent-XMPP distribution.

Index


Code Index:

NAME

Top

AnyEvent::XMPP::Error::IQAuth - IQ authentication error

Subclass of AnyEvent::XMPP::Error

METHODS

context

This method returns either:

iq_error which means that a IQ error was caught, which can be accessed with the iq_error method.

Or: no_fields which means that no form fields were found in the IQ auth result.

AUTHOR

Top

Robin Redeker, <elmex at ta-sa.org>, JID: <elmex at jabber.org>

COPYRIGHT & LICENSE

Top


AnyEvent-XMPP documentation Contained in the AnyEvent-XMPP distribution.
package AnyEvent::XMPP::Error::IQAuth;
use AnyEvent::XMPP::Error;
use strict;
our @ISA = qw/AnyEvent::XMPP::Error/;

sub context   { $_[0]->{context} }

sub iq_error { $_[0]->{iq_error} }

sub string {
   my ($self) = @_;

   sprintf "iq auth error: '%s' %s",
      $self->context, ($self->context eq 'iq_error' ? $self->iq_error ()->string : '')
}

1;