主頁 > 服務(wù)與支持 > 開發(fā)平臺 > 客戶端SDK參考 > iOS應(yīng)用集成 > 業(yè)務(wù)開發(fā) 鏈接登錄
更新時間:2019-11-20
通過此方式可以拉起用戶設(shè)備上已經(jīng)安裝的CloudLink應(yīng)用并根據(jù)鏈接中傳入的參數(shù)執(zhí)行登錄鑒權(quán)。
業(yè)務(wù)流程
1 2 3 4 5 6 7 8 9 10 11 12 13 |
- (void)ssoLogin { NSString *address = 服務(wù)器地址; NSString *port = 服務(wù)器端口; NSString *domain = 企業(yè)域名; NSString *userTicket = 授權(quán)code; NSString *loginString = [NSString stringWithFormat:"cloudlink://welinksoftclient/h5page?page=ssoLogin&server_url=%@&port=%@&domain=%@&code=%@", address, port, domain, userTicket]; NSURL *loginUrl = [NSURL URLWithString:loginString]; if (@available(iOS 10.0, *)) { [[UIApplication sharedApplication] openURL:loginUrl options:@{} completionHandler:nil]; } else { [[UIApplication sharedApplication] openURL:loginUrl]; } } |