Permalink
Browse files

[XMPPStream] Update XMPPStream to work with the current Facebook Chat…

… API. Broke out the various SASL authentication classes.
  • Loading branch information...
1 parent 2471648 commit 7674d9119058dc7fb0e70860d382244f8c5d6afe Eric Chamberlain committed Oct 2, 2011
View
@@ -2,4 +2,5 @@
*.mode1v3
*.mode2v3
xcuserdata
-.netrc
+.netrc
+.DS_Store
View
@@ -62,6 +62,9 @@ typedef enum XMPPStreamErrorCode XMPPStreamErrorCode;
UInt16 hostPort;
NSString *tempPassword;
+ BOOL isAuthToken;
+
+ NSString *appId;
XMPPJID *myJID;
XMPPJID *remoteJID;
@@ -120,6 +123,12 @@ typedef enum XMPPStreamErrorCode XMPPStreamErrorCode;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
+ * The appId can be passed to custom authentication classes.
+ * For example, the appId is used for Facebook Chat X-FACEBOOK-PLATFORM SASL authentication.
+**/
+@property (readwrite,copy) NSString *appId;
+
+/**
* The server's hostname that should be used to make the TCP connection.
* This may be a domain name (e.g. "deusty.com") or an IP address (e.g. "70.85.193.226").
*
@@ -405,12 +414,12 @@ typedef enum XMPPStreamErrorCode XMPPStreamErrorCode;
/**
* Authentication.
*
- * The authenticateWithPassword:error: method is asynchronous.
- * It will return immediately, and the delegate methods are used to determine success.
+ * The authenticateWithPassword:error: and authenticateWithFacebookAuthToken:error: methods are asynchronous.
+ * Each will return immediately, and the delegate methods are used to determine success.
* See the xmppStreamDidAuthenticate: and xmppStream:didNotAuthenticate: methods.
*
* If there is something immediately wrong, such as the stream is not connected,
- * this method will return NO and set the error.
+ * the method will return NO and set the error.
*
* The errPtr parameter is optional - you may pass nil.
*
@@ -425,8 +434,10 @@ typedef enum XMPPStreamErrorCode XMPPStreamErrorCode;
- (BOOL)supportsAnonymousAuthentication;
- (BOOL)supportsPlainAuthentication;
- (BOOL)supportsDigestMD5Authentication;
+- (BOOL)supportsXFacebookPlatformAuthentication;
- (BOOL)supportsDeprecatedPlainAuthentication;
- (BOOL)supportsDeprecatedDigestAuthentication;
+- (BOOL)authenticateWithFacebookAuthToken:(NSString *)authToken error:(NSError **)errPtr;
- (BOOL)authenticateWithPassword:(NSString *)password error:(NSError **)errPtr;
- (BOOL)authenticateAnonymously:(NSError **)errPtr;
Oops, something went wrong.

0 comments on commit 7674d91

Please sign in to comment.