账号
登录参数
@interface YealinkLoginParam
账号类型
@property (nonatomic, assign) AccountType accountType
账号
@property (nonatomic, copy, nonnull) NSString *account
密码
@property (nonatomic, copy, nonnull) NSString *password
是否记住账号,自动登录
@property (nonatomic, assign) BOOL rememberMe
第三方用户的唯一标识ID (必须)
@property (nonatomic, copy) NSString *identity
账号类型
@property (nonatomic, assign) NSInteger identityType
企业号,多租户下必填,单租户模式下不用填 (非必须)
@property (nonatomic, copy) NSString *partyNumber
名称,未传入时,默认使用identity值 (非必须)
@property (nonatomic, copy) NSString *name
用户名,未传入时,则为空。只允许输入字母、英文符号、数字且不能为纯数字以及邮箱 (非必须)
@property (nonatomic, copy) NSString *userName
账号,必须符合企业号码号段规则,未传入账号时,则系统自动分配 (非必须)
@property (nonatomic, copy) NSString *number
手机号,未传入时,则为空,传入时需保证有效 (非必须)
@property (nonatomic, copy) NSString *mobile
手机区号,默认86,传入时需保证有效 (非必须)
@property (nonatomic, copy) NSString *mobileCode
邮箱,未传入时,则为空,传入时需保证有效 (非必须)
@property (nonatomic, copy) NSString *email
性别,值:0:保密;1:男;2:女,未传入时,默认为0 (非必须)
@property (nonatomic, assign) NSInteger gender
邮箱,未传入时,则为空,传入时需保证有效 (非必须)
@property (nonatomic, copy) NSString *key
邮箱,未传入时,则为空,传入时需保证有效 (非必须)
@property (nonatomic, copy) NSString *value
用户信息
@interface YealinkSDKAccountInfo
获取登录帐户的用户名(只有登录用户)
@property (nonatomic, copy, nonnull) NSString *userName
获取用户电子邮件地址
@property (nonatomic, copy, nonnull) NSString *emailAddress
获取用户手机号
@property (nonatomic, copy, nonnull) NSString *phoneNumber
获取用户帐号
@property (nonatomic, copy, nonnull) NSString *accountNumber
获取用户subjectId
@property (nonatomic, copy, nonnull) NSString *subjectId
账户服务功能
@interface YealinkSDKAccountService
登录用户账号
- 说明:设置rememberMe为YES下次重启应用无需重新登录,会自动登录
- (void)login:(YealinkLoginParam *)param
NAME |
NOTERIPTION |
param |
登录参数,包含账号、密码、服务器域名 |
@interface YealinkLoginParam : NSObject
/*!
@brief 账号类型
*/
@property (nonatomic, assign) AccountType accountType;
/*!
@brief 账号
*/
@property (nonatomic, copy, nonnull) NSString *account;
/*!
@brief 密码
*/
@property (nonatomic, copy, nonnull) NSString *password;
/*!
@brief 是否记住账号,自动登录
*/
@property (nonatomic, assign) BOOL rememberMe;
@end
appId登录用户账号
- (void)appIdLogin:(YealinkAppIdLoginParam *)param
NAME |
NOTERIPTION |
param |
AppId用的参数 |
@interface YealinkAppIdLoginParam : NSObject
/*!
@brief 第三方用户的唯一标识ID (必须)
*/
@property (nonatomic, copy) NSString *identity;
/*!
@brief 账号类型
*/
@property (nonatomic, assign) NSInteger identityType;
/*!
@brief 企业号,多租户下必填,单租户模式下不用填 (非必须)
*/
@property (nonatomic, copy) NSString *partyNumber;
/*!
@brief 名称,未传入时,默认使用identity值 (非必须)
*/
@property (nonatomic, copy) NSString *name;
/*!
@brief 用户名,未传入时,则为空。只允许输入字母、英文符号、数字且不能为纯数字以及邮箱 (非必须)
*/
@property (nonatomic, copy) NSString *userName;
/*!
@brief 账号,必须符合企业号码号段规则,未传入账号时,则系统自动分配 (非必须)
*/
@property (nonatomic, copy) NSString *number;
/*!
@brief 手机号,未传入时,则为空,传入时需保证有效 (非必须)
*/
@property (nonatomic, copy) NSString *mobile;
/*!
@brief 手机区号,默认86,传入时需保证有效 (非必须)
*/
@property (nonatomic, copy) NSString *mobileCode;
/*!
@brief 邮箱,未传入时,则为空,传入时需保证有效 (非必须)
*/
@property (nonatomic, copy) NSString *email;
/*!
@brief 性别,值:0:保密;1:男;2:女,未传入时,默认为0 (非必须)
*/
@property (nonatomic, assign) NSInteger gender;
@end
sso登录用户账号
- (void)ssoLogin:(NSArray<YealinkSsoLoginNode *> *)ssoNodeList thirdPartyDomain:(NSString *)thirdPartyDomain
NAME |
NOTERIPTION |
ssoNodeList |
sso登录协议的参数,不同的协议传参不同,如Oauth2.0/OIDC协议应该传参partyId、clientType、code |
thirdPartyDomain |
sso登录第三方企业域名 |
@interface YealinkSsoLoginNode : NSObject
/*!
@brief 邮箱,未传入时,则为空,传入时需保证有效 (非必须)
*/
@property (nonatomic, copy) NSString *key;
/*!
@brief 邮箱,未传入时,则为空,传入时需保证有效 (非必须)
*/
@property (nonatomic, copy) NSString *value;
@end
获取登录用户信息
- (nullable YealinkSDKAccountInfo *)getAccountInfo
TYPE |
NOTERIPTION |
YealinkSDKAccountInfo |
登录用户信息 |
@interface YealinkSDKAccountInfo : NSObject
/*!
@brief 获取登录帐户的用户名(只有登录用户)
*/
@property (nonatomic, copy, nonnull) NSString *userName;
/*!
@brief 获取用户电子邮件地址
*/
@property (nonatomic, copy, nonnull) NSString *emailAddress;
/*!
@brief 获取用户手机号
*/
@property (nonatomic, copy, nonnull) NSString *phoneNumber;
/*!
@brief 获取用户帐号
*/
@property (nonatomic, copy, nonnull) NSString *accountNumber;
/*!
@brief 获取用户subjectId
*/
@property (nonatomic, copy, nonnull) NSString *subjectId;
@end
登出用户账号
- (void)logout
获取企业信息是否有单租户
- 说明:设置后会有onRequestServiceFeature委托是否成功
- (void)requestServiceFeature
设置企业号/域账号,并验证企业信息(仅第三方登录用)
- 说明:设置后会有onRequestThirdPartyInfo委托是否成功
- (void)requestThirdPartyInfo:(NSString *)domain
NAME |
NOTERIPTION |
domain |
企业号/域账号 |
企业号/域账号登录(第三方登录)
- 说明:设置后会有onThirdPartyLogin委托是否成功; 设置rememberMe为YES下次重启应用无需重新登录,会自动登录
- (void)thirdPartyInfo:(NSString *)thirdAccount password:(NSString *)thirdPassword rememberMe:(BOOL)rememberMe
NAME |
NOTERIPTION |
thirdAccount |
企业号/域账号 |
thirdPassword |
企业号/域账号 密码 |
rememberMe |
是否记住账号,自动登录 |
授权码登录
- 说明:登录回调YealinkSDKAccountServiceDelegate,授权码失败返回onHandleError委托
- (void)authCodeLogin:(NSString *)authCode
NAME |
NOTERIPTION |
authCode |
授权码 |