Packageorg.igniterealtime.xiff.core
Classpublic class InBandRegistrator
InheritanceInBandRegistrator Inheritance flash.events.EventDispatcher

Manager for XEP-0077: In-Band Registration

Once the connection has been established and the server has provided feature information, check XMPPConnection.registrationSupported before trying to use the registration.

See also

http://xmpp.org/extensions/xep-0077.html


Public Properties
 PropertyDefined By
  connection : IXMPPConnection
The instance of the XMPPConnection class to use for sending and receiving data.
InBandRegistrator
Public Methods
 MethodDefined By
  
Manage client registration and password changing.
InBandRegistrator
  
changePassword(newPassword:String):void
Changes the user's account password on the server.
InBandRegistrator
  
Issues a request for the information that must be submitted for registration with the server.
InBandRegistrator
  
sendRegistrationFields(fieldMap:Object, key:String = null):void
Registers a new account with the server, sending the registration data as specified in the fieldMap
InBandRegistrator
Events
 Event Summary Defined By
  Dispatched when a password change is successful.InBandRegistrator
  Dispatched on when new user account registration is successful.InBandRegistrator
  Dispatched on when new user account registration is successful.InBandRegistrator
Property Detail
connectionproperty
connection:IXMPPConnection

The instance of the XMPPConnection class to use for sending and receiving data.


Implementation
    public function get connection():IXMPPConnection
    public function set connection(value:IXMPPConnection):void
Constructor Detail
InBandRegistrator()Constructor
public function InBandRegistrator(aConnection:IXMPPConnection = null)

Manage client registration and password changing.

Parameters
aConnection:IXMPPConnection (default = null) — A reference to the XMPPConnection instance to use.
Method Detail
changePassword()method
public function changePassword(newPassword:String):void

Changes the user's account password on the server. If the password change is successful, the class will broadcast a ChangePasswordSuccessEvent.PASSWORD_SUCCESS event.

Parameters

newPassword:String — The new password

getRegistrationFields()method 
public function getRegistrationFields():void

Issues a request for the information that must be submitted for registration with the server. When the data returns, a RegistrationFieldsEvent.REG_FIELDS event is dispatched containing the requested data.

sendRegistrationFields()method 
public function sendRegistrationFields(fieldMap:Object, key:String = null):void

Registers a new account with the server, sending the registration data as specified in the fieldMap

Parameters

fieldMap:Object — An object map containing the data to use for registration. The map should be composed of attribute:value pairs for each registration data item.
 
key:String (default = null) — This element is obsolete, but is included here for historical completeness.

Event Detail
changePasswordSuccess Event
Event Object Type: org.igniterealtime.xiff.events.ChangePasswordSuccessEvent
ChangePasswordSuccessEvent.type property = org.igniterealtime.xiff.events.ChangePasswordSuccessEvent.PASSWORD_SUCCESS

Dispatched when a password change is successful.

registrationFields Event  
Event Object Type: org.igniterealtime.xiff.events.RegistrationFieldsEvent
RegistrationFieldsEvent.type property = org.igniterealtime.xiff.events.RegistrationFieldsEvent.REG_FIELDS

Dispatched on when new user account registration is successful.

registrationSuccess Event  
Event Object Type: org.igniterealtime.xiff.events.RegistrationSuccessEvent
RegistrationSuccessEvent.type property = org.igniterealtime.xiff.events.RegistrationSuccessEvent.REGISTRATION_SUCCESS

Dispatched on when new user account registration is successful.