XMPPAnonymousAuthentication.h
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#import <Foundation/Foundation.h>
#import "XMPPSASLAuthentication.h"
#import "XMPP.h"
@interface XMPPAnonymousAuthentication : NSObject <XMPPSASLAuthentication>
- (id)initWithStream:(XMPPStream *)stream;
// This class implements the XMPPSASLAuthentication protocol.
//
// See XMPPSASLAuthentication.h for more information.
@end
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark -
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@interface XMPPStream (XMPPAnonymousAuthentication)
/**
* Returns whether or not the server support anonymous authentication.
*
* This information is available after the stream is connected.
* In other words, after the delegate has received xmppStreamDidConnect: notification.
**/
- (BOOL)supportsAnonymousAuthentication;
/**
* This method attempts to start the anonymous authentication process.
*
* This method is asynchronous.
*
* If there is something immediately wrong,
* such as the stream is not connected or doesn't support anonymous authentication,
* the method will return NO and set the error.
* Otherwise the delegate callbacks are used to communicate auth success or failure.
*
* @see xmppStreamDidAuthenticate:
* @see xmppStream:didNotAuthenticate:
**/
- (BOOL)authenticateAnonymously:(NSError **)errPtr;
@end