Class MUES::LoginAuthEvent
In: lib/mues/events/loginevents.rb  (CVS)
Parent: LoginEvent

A LoginEvent class for passing the information from an authentication attempt to the MUES::Engine for confirmation. It contains the authentication information and two callbacks: one for a successful authentication, and one for failed authentication.

Methods

new   to_s  

Constants

SVNRev = %q$Rev: 1215 $   SVN Revision
SVNId = %q$Id: loginevents.rb 1215 2004-06-14 06:02:09Z deveiant $   SVN Id
SVNURL = %q$URL: svn+ssh://deveiate.org/usr/local/svn/MUES/trunk/lib/mues/events/loginevents.rb $   SVN URL

Attributes

failureCallback  [R]  The callback (a Method object) for indicating a failed attempt
filter  [R]  The IOEventFilter created for the remote client by the Listener.
password  [R]  The unencrypted password entered by the user
successCallback  [R]  The callback (a Method object) for indicating a successful attempt
username  [R]  The username entered by the user

Public Class methods

Create a new authorization event with the specified values and return it. The stream specifies the IOEventStream belonging to the authenticating user. The user and pass arguments are the username and password that have been offered by the connecting user, the filter is the output filter containing the client connection, and the sCall and fCall are String, Method, or Proc objects which specify a function to call to indicate successful or failed authentication. If the callback is a String, it is assumed to be the name of the method to call on the specified IOEventStream object.

[Source]

# File lib/mues/events/loginevents.rb, line 142
        def initialize( stream, user, pass, filter, sCall, fCall )
            super( stream )

            @username            = user
            @password            = pass
            @filter              = filter or raise ArgumentError, "No filter"
            @successCallback = sCall or raise ArgumentError, "No success callback"
            @failureCallback = fCall or raise ArgumentError, "No failure callback"
        end

Public Instance methods

METHOD: to_s Returns a stringified version of the event

[Source]

# File lib/mues/events/loginevents.rb, line 175
        def to_s
            return "%s: '%s' with password '%s'" % [
                super(),
                @username,
                @password
            ]
        end

[Validate]