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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
* POSSIBILITY OF SUCH DAMAGE.
*/
#import <ObjFW/ObjFW.h>
OF_ASSUME_NONNULL_BEGIN
/**
* \brief A base class for classes implementing authentication mechanisms
*/
@interface XMPPAuthenticator: OFObject
{
OFString *_authzid, *_authcid, *_password;
}
/// \brief The authzid to get authorization for
@property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *authzid;
/// \brief The authcid to authenticate with
@property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *authcid;
/// \brief The password to authenticate with
@property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *password;
/**
* \brief Initializes an already allocated XMPPAuthenticator with an authcid
* and password.
*
* \param authcid The authcid to authenticate with
* \param password The password to authenticate with
* \return A initialized XMPPAuthenticator
*/
- initWithAuthcid: (nullable OFString *)authcid
password: (nullable OFString *)password;
/**
* \brief Initializes an already allocated XMPPSCRAMAuthenticator with an
* authzid, authcid and password.
*
* \param authzid The authzid to get authorization for
* \param authcid The authcid to authenticate with
* \param password The password to authenticate with
* \return A initialized XMPPAuthenticator
*/
- initWithAuthzid: (nullable OFString *)authzid
authcid: (nullable OFString *)authcid
password: (nullable OFString *)password OF_DESIGNATED_INITIALIZER;
/**
* \brief Returns OFData containing the initial authentication message.
*
* \return An OFDataAray containing the initial authentication message
*/
- (nullable OFData *)initialMessage;
/**
* \brief Continue authentication with the specified data.
*
* \param data The continuation data send by the server
* \return The appropriate response if the data was a challenge, nil otherwise
*/
- (nullable OFData *)continueWithData: (OFData *)data;
@end
OF_ASSUME_NONNULL_END
|
|
|
>
|
>
>
>
|
>
>
>
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
* POSSIBILITY OF SUCH DAMAGE.
*/
#import <ObjFW/ObjFW.h>
OF_ASSUME_NONNULL_BEGIN
/*!
* @brief A base class for classes implementing authentication mechanisms
*/
@interface XMPPAuthenticator: OFObject
{
OFString *_authzid, *_authcid, *_password;
}
/*!
* The authzid to get authorization for.
*/
@property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *authzid;
/*!
* The authcid to authenticate with.
*/
@property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *authcid;
/*!
* The password to authenticate with.
*/
@property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *password;
/*!
* @brief Initializes an already allocated XMPPAuthenticator with an authcid
* and password.
*
* @param authcid The authcid to authenticate with
* @param password The password to authenticate with
* @return A initialized XMPPAuthenticator
*/
- initWithAuthcid: (nullable OFString *)authcid
password: (nullable OFString *)password;
/*!
* @brief Initializes an already allocated XMPPSCRAMAuthenticator with an
* authzid, authcid and password.
*
* @param authzid The authzid to get authorization for
* @param authcid The authcid to authenticate with
* @param password The password to authenticate with
* @return A initialized XMPPAuthenticator
*/
- initWithAuthzid: (nullable OFString *)authzid
authcid: (nullable OFString *)authcid
password: (nullable OFString *)password OF_DESIGNATED_INITIALIZER;
/*!
* @brief Returns OFData containing the initial authentication message.
*
* @return An OFDataAray containing the initial authentication message
*/
- (nullable OFData *)initialMessage;
/*!
* @brief Continue authentication with the specified data.
*
* @param data The continuation data send by the server
* @return The appropriate response if the data was a challenge, nil otherwise
*/
- (nullable OFData *)continueWithData: (OFData *)data;
@end
OF_ASSUME_NONNULL_END
|