Packageorg.igniterealtime.xiff.data.register
Classpublic class RegisterExtension
InheritanceRegisterExtension Inheritance Extension Inheritance XMLStanza Inheritance ExtensionContainer Inheritance Object
Implements IExtension

XEP-0077: In-Band Registration

Implements jabber:iq:register namespace. Use this to create new accounts on the jabber server. Send an empty IQ.TYPE_GET packet with this extension and the return will either be a conflict, or the fields you will need to fill out.

Send a IQ.TYPE_SET packet to the server and with the fields that are listed in 'getRequiredFieldNames()' set on this extension. Check the result and re-establish the connection with the new account.

See also

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


Public Properties
 PropertyDefined By
  address : String
RegisterExtension
  city : String
RegisterExtension
  date : String
RegisterExtension
  email : String
RegisterExtension
  first : String
RegisterExtension
  instructions : String
Use null to remove.
RegisterExtension
  key : String
This element is obsolete, but is included here for historical completeness.
RegisterExtension
  last : String
RegisterExtension
  misc : String
RegisterExtension
  nick : String
RegisterExtension
  password : String
The 'jabber:iq:register' namespace enables a user to change his or her password with a server or service.
RegisterExtension
  phone : String
RegisterExtension
  state : String
RegisterExtension
  text : String
RegisterExtension
  unregister : Boolean
The 'jabber:iq:register' namespace also makes it possible for an entity to cancel a registration with a host by sending a remove element in an IQ set.
RegisterExtension
  url : String
RegisterExtension
  username : String
The 'jabber:iq:register' namespace enables a user to change his or her password with a server or service.
RegisterExtension
 Inheritedxml : XML
[override] Override in order to take care of setting the Namespace and checking for containing extensions.
Extension
  zip : String
RegisterExtension
Public Methods
 MethodDefined By
  
RegisterExtension(parent:XML = null)
RegisterExtension
 Inherited
Add extension to the list of the given namespace and insert to the XML element as a child.
ExtensionContainer
 Inherited
ExtensionContainer
 Inherited
getAllExtensionsByNS(nameSpace:String):Array
ExtensionContainer
 Inherited
getAttribute(name:String):String
Convinience method for getting element value from the XML.
XMLStanza
 Inherited
getChildAttribute(elem:String, name:String):String
Convinience method for getting child element attribute value from the XML.
XMLStanza
 Inherited
getChildField(elem:String, name:String):String
Convinience method for getting child element value from the XML.
XMLStanza
  
RegisterExtension
 Inherited
getExtension(elementName:String):IExtension
Get the extension having the given element name.
ExtensionContainer
 Inherited
getField(name:String):String
Convinience method for getting element value from the XML.
XMLStanza
  
getNS():String
RegisterExtension
  
In order to determine which fields are required for registration with a host, an entity SHOULD first send an IQ get to the host.
RegisterExtension
 Inherited
remove():void
Removes the extension from its parent.
Extension
 Inherited
removeAllExtensions(nameSpace:String):void
ExtensionContainer
 Inherited
removeExtension(extension:IExtension):Boolean
ExtensionContainer
 Inherited
removeFields(name:String):void
Helper method for removing all child elements that have the given name.
XMLStanza
 Inherited
setAttribute(name:String, value:String):void
Convinience method for setting a value to a element in the XML.
XMLStanza
 Inherited
setChildAttribute(elem:String, name:String, value:String):void
Convinience method for setting an attribute for a child element of the XML.
XMLStanza
 Inherited
setChildField(elem:String, name:String, value:String):void
Convinience method for setting a value for a child element of the XML.
XMLStanza
 Inherited
setField(name:String, value:String):void
Convinience method for setting a value to a element in the XML.
XMLStanza
 Inherited
toString():String
Converts the base stanza XML to a string.
XMLStanza
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NS : Namespace
[static] Default XML namespace.
XMLStanza
  ELEMENT_NAME : String = query
[static]
RegisterExtension
 InheritedFLASH_NS : Namespace
[static]
XMLStanza
  NS : String = jabber:iq:register
[static]
RegisterExtension
 InheritedSTREAM_NS : Namespace
[static]
XMLStanza
Property Detail
addressproperty
address:String


Implementation
    public function get address():String
    public function set address(value:String):void
cityproperty 
city:String


Implementation
    public function get city():String
    public function set city(value:String):void
dateproperty 
date:String


Implementation
    public function get date():String
    public function set date(value:String):void
emailproperty 
email:String


Implementation
    public function get email():String
    public function set email(value:String):void
firstproperty 
first:String


Implementation
    public function get first():String
    public function set first(value:String):void
instructionsproperty 
instructions:String

Use null to remove.


Implementation
    public function get instructions():String
    public function set instructions(value:String):void
keyproperty 
key:String

This element is obsolete, but is included here for historical completeness.

The key element was used as a "transaction key" in certain IQ interactions in order to verify the identity of the sender. In particular, it was used by servers (but generally not services) during in-band registration, since normally a user does not yet have a 'from' address before registering.

Use null to remove.


Implementation
    public function get key():String
    public function set key(value:String):void
lastproperty 
last:String


Implementation
    public function get last():String
    public function set last(value:String):void
miscproperty 
misc:String


Implementation
    public function get misc():String
    public function set misc(value:String):void
nickproperty 
nick:String


Implementation
    public function get nick():String
    public function set nick(value:String):void
passwordproperty 
password:String

The 'jabber:iq:register' namespace enables a user to change his or her password with a server or service. Once registered, the user can change passwords by setting username and password.


Implementation
    public function get password():String
    public function set password(value:String):void

See also

phoneproperty 
phone:String


Implementation
    public function get phone():String
    public function set phone(value:String):void
stateproperty 
state:String


Implementation
    public function get state():String
    public function set state(value:String):void
textproperty 
text:String


Implementation
    public function get text():String
    public function set text(value:String):void
unregisterproperty 
unregister:Boolean

The 'jabber:iq:register' namespace also makes it possible for an entity to cancel a registration with a host by sending a remove element in an IQ set. The host MUST determine the identity of the requesting entity based on the 'from' address of the IQ get.


Implementation
    public function get unregister():Boolean
    public function set unregister(value:Boolean):void
urlproperty 
url:String


Implementation
    public function get url():String
    public function set url(value:String):void
usernameproperty 
username:String

The 'jabber:iq:register' namespace enables a user to change his or her password with a server or service. Once registered, the user can change passwords by setting username and password.


Implementation
    public function get username():String
    public function set username(value:String):void

See also

zipproperty 
zip:String


Implementation
    public function get zip():String
    public function set zip(value:String):void
Constructor Detail
RegisterExtension()Constructor
public function RegisterExtension(parent:XML = null)

Parameters
parent:XML (default = null) — (Optional) The parent node used to build the XML tree.
Method Detail
getElementName()method
public function getElementName():String

Returns
String
getNS()method 
public function getNS():String

Returns
String
getRequiredFieldNames()method 
public function getRequiredFieldNames():Array

In order to determine which fields are required for registration with a host, an entity SHOULD first send an IQ get to the host. The entity SHOULD NOT attempt to guess at the required fields by first sending an IQ set, since the nature of the required data is subject to service provisioning.

All fields available in this XML, except "key" and "instructions" are required.

Returns
Array — Names of the required fields
Constant Detail
ELEMENT_NAMEConstant
public static const ELEMENT_NAME:String = query

NSConstant 
public static const NS:String = jabber:iq:register