Packageorg.igniterealtime.xiff.auth
Classpublic class XFacebookPlatform
InheritanceXFacebookPlatform Inheritance SASLAuth Inheritance Object
Implements ISASLAuth

This class provides SASL authentication using the X-FACEBOOK-PLATFORM mechanism.

Facebook Chat currently supports the following features, related to authentication:

See also

http://tools.ietf.org/html/rfc3920#section-6
https://developers.facebook.com/docs/chat/


Public Properties
 PropertyDefined By
  fb_access_token : String
[static]
XFacebookPlatform
  fb_app_id : String
[static]
XFacebookPlatform
 Inheritedrequest : XML
[read-only] The XML for the authentication request.
SASLAuth
Protected Properties
 PropertyDefined By
 Inheritedconnection : IXMPPConnection
Connection that is used to authenticate, if any
SASLAuth
 Inheritedreq : XML
The XML of the authentication request.
SASLAuth
 Inheritedresponse : XML
The XML of the challenge response.
SASLAuth
 Inheritedstage : int
The current response stage.
SASLAuth
Public Methods
 MethodDefined By
  
Creates a new XFacebookPlatform authentication object.
XFacebookPlatform
  
handleChallenge(stage:int, challenge:XML):XML
[override] Called when a challenge to this authentication is received.
XFacebookPlatform
  
handleResponse(stage:int, response:XML):Object
[override] Called when a response to this authentication is received.
XFacebookPlatform
Public Constants
 ConstantDefined By
  MECHANISM : String = X-FACEBOOK-PLATFORM
[static]
XFacebookPlatform
 InheritedNS : String = urn:ietf:params:xml:ns:xmpp-sasl
[static]
SASLAuth
 InheritedRESPONSE_SUCCESS : String = success
[static]
SASLAuth
Property Detail
fb_access_tokenproperty
public static var fb_access_token:String

fb_app_idproperty 
public static var fb_app_id:String

Constructor Detail
XFacebookPlatform()Constructor
public function XFacebookPlatform(connection:IXMPPConnection)

Creates a new XFacebookPlatform authentication object.

Parameters
connection:IXMPPConnection — A reference to the XMPPConnection instance in use.
Method Detail
handleChallenge()method
override public function handleChallenge(stage:int, challenge:XML):XML

Called when a challenge to this authentication is received.

The mechanism starts with a server challenge, in the form of a common HTTP query string: an ampersand-separated sequence of equals-sign-delimited key/value pairs. The keys and values are UTF-8-encoded and URL-encoded. The query string contains two items: method and nonce.

The client's reply should be a similarly-encoded query string prepared as if it were going to call a method against the Facebook API. The call should contain the following parameters:

The server will then respond with a success or failure message. Note that this needs to be over TLS or you'll get an error.

Parameters

stage:int — The current stage in the authentication process.
 
challenge:XML — The XML of the actual authentication challenge.

Returns
XML — The XML response to the challenge.
handleResponse()method 
override public function handleResponse(stage:int, response:XML):Object

Called when a response to this authentication is received.

Parameters

stage:int — The current stage in the authentication process.
 
response:XML — The XML of the actual authentication response.

Returns
Object — An object specifying the current state of the authentication.
Constant Detail
MECHANISMConstant
public static const MECHANISM:String = X-FACEBOOK-PLATFORM