测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
授权协议 | MIT |
发布最后发布 | 2015年8月 |
由 Hernan Zalazar 维护。
依赖关系 | |
googleplus-ios-sdk | ~> 1.7.1 |
Lock/Core | ~> 1.11 |
Auth0 是一个身份验证代理,它支持社交身份提供者以及如 Active Directory、LDAP、Google Apps 和 Salesforce 等企业身份提供者。
Lock-GooglePlus 帮助您将原生登录与 Google+ iOS SDK 和 Lock 集成
iOS 7+
Lock-GooglePlus 可以通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中
pod "Lock-GooglePlus", "~> 1.0"
然后在您的项目 Info.plist
文件中,使用您的应用打包标识符注册一个自定义 URL 类型。有关更多信息,请参阅 Google+ 入门指南。
只需创建一个新的 A0GooglePlusAuthenticator
实例
A0GooglePlusAuthenticator *googlePlus = [A0GooglePlusAuthenticator newAuthenticatorWithClientId:@"G+_CLIENT_ID"];
let googlePlus = A0GooglePlusAuthenticator.newAuthenticatorWithClientId("G+_CLIENT_ID")
可以从 Google 的 API 仪表板获取 G+ 客户端 id,有关更多信息,请参阅此 指南
并将其与您的 A0Lock
实例注册
A0Lock *lock = //Get your A0Lock instance
[lock registerAuthenticators:@[googlePlus]];
let lock:A0Lock = //Get your A0Lock instance
lock.registerAuthenticators([googlePlus])
创建和注册
A0GooglePlusAuthenticator
的好地方是AppDelegate.m
或AppDelegate.swift
文件。
+ (A0GooglePlusAuthenticator *)newAuthenticatorWithClientId:(NSString *)clientId;
使用 G+ 客户端标识符创建一个新的 'A0GooglePlusAuthenticator'
A0GooglePlusAuthenticator *googlePlus = [A0GooglePlusAuthenticator newAuthenticatorWithClientId:@"G+_CLIENT_ID"];
let googlePlus = A0GooglePlusAuthenticator.newAuthenticatorWithClientId("G+_CLIENT_ID")
+ (A0GooglePlusAuthenticator *)newAuthenticatorWithClientId:(NSString *)clientId andScopes:(NSArray *)scopes;
使用 G+ 客户端标识符和 G+ 身份验证的作用域列表创建一个新的 'A0GooglePlusAuthenticator'
A0GooglePlusAuthenticator *googlePlus = [A0GooglePlusAuthenticator newAuthenticatorWithClientId:@"G+_CLIENT_ID" andScopes:@[@"profile"]];
let googlePlus = A0GooglePlusAuthenticator.newAuthenticatorWithClientId("G+_CLIENT_ID", andScopes:["profile"])
如果您发现了错误或功能请求,请在本次仓库的问题部分进行报告。请不要在公开的GitHub问题跟踪器上报告安全漏洞。有关安全问题的披露程序,请参阅负责任的披露计划。
Auth0可以帮助您
Auth0
Lock-GooglePlus在MIT许可证下可用。有关更多信息,请参阅许可证文件。