LaunchKey 是一个身份和访问管理平台。此 iOS SDK 允许开发者无需直接与平台 API 交互即可快速集成 LaunchKey 平台和基于 iOS 的应用程序。
使用 LaunchKey API 的开发者文档可在此处找到。
有关 LaunchKey 平台的概述可在此处找到。
使用 LaunchKey SDK 需要以下项目
LaunchKey 账户 - 需要使用 LaunchKey 移动应用 来设置新账户并访问 LaunchKey 仪表板。
应用程序 - 可以在 LaunchKey 仪表板 中创建新应用程序。从应用程序中,您将需要以下内容,这些内容位于应用程序详细信息的“密钥”部分
框架、源和文档文件可通过 CocoaPods 或 GitHub 获取。
下载 LaunchKey SDK 的框架并将其添加到您的项目中
初始化 LKAuthenticationManager
[[LKAuthenticationManager sharedClient] init:@"Your Rocket Key"
withSecretKey:@"Your Secret Key"
withPrivateKey:@"Your Private Key"];
使用 SDK
通过 LaunchKey 授权用户标识符。标识符可以是 LaunchKey 用户名、userPushId 或唯一标识符(用于白标配对过程)
[[LKAuthenticationManager sharedClient] authorize:@"identifier" withSuccess:^(NSString *userHash, NSString *authRequest, NSString *userPushId, NSString *deviceId) {
} withFailure:^(NSString *errorMessage, NSString *errorCode) {
//error handling
}];
确定用户名是否仍然被授权(即尚未远程结束会话)
[[LKAuthenticationManager sharedClient] isAuthorized:@"authRequest" withSuccess:^(BOOL authorized) {
} withFailure:^(NSString *errorMessage, NSString *errorCode) {
//error handling
}];
结束会话
[[LKAuthenticationManager sharedClient] logout:@"authRequest" withSuccess:^{
} withFailure:^(NSString *errorMessage, NSString *errorCode) {
//error handling
}];
添加白标用户
[[LKAuthenticationManager sharedClient] createWhiteLabelUser:@"identifier"withSuccess:^(NSString *qrCode, NSString *qrUrl) {
// Show the user the QR Code from the QR Code URL to be validated in a white label application
} withFailure:^(NSString *errorMessage, NSString *errorCode) {
//error handling
}];
在 GitHub 上提交功能请求和错误。
向Twitter账号@LaunchKeyHelp提交问题。
在freenode上的#launchkey
聊天室与LaunchKey团队互动。
浏览常见问题解答或提交问题至LaunchKey支持团队,涵盖技术和非技术问题。访问LaunchKey帮助台这里。