Lock-GooglePlus 1.1.0

Lock-GooglePlus 1.1.0

测试已测试
语言语言 Obj-CObjective C
授权协议 MIT
发布最后发布2015年8月

Hernan Zalazar 维护。



 
依赖关系
googleplus-ios-sdk~> 1.7.1
Lock/Core~> 1.11
 

  • Auth0 和 Hernan Zalazar

重要:由于 Apple 拒绝使用 Google+ SDK 的应用程序(因使用 Safari 进行身份验证),我们建议在 Google 修复其 SDK 之前避免使用此库。

Auth0 是一个身份验证代理,它支持社交身份提供者以及如 Active Directory、LDAP、Google Apps 和 Salesforce 等企业身份提供者。

Lock-GooglePlus 帮助您将原生登录与 Google+ iOS SDKLock 集成

要求

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.mAppDelegate.swift 文件。

API

A0GooglePlusAuthenticator

A0GooglePlusAuthenticator#newAuthenticatorWithClientId

+ (A0GooglePlusAuthenticator *)newAuthenticatorWithClientId:(NSString *)clientId;

使用 G+ 客户端标识符创建一个新的 'A0GooglePlusAuthenticator'

A0GooglePlusAuthenticator *googlePlus = [A0GooglePlusAuthenticator newAuthenticatorWithClientId:@"G+_CLIENT_ID"];
let googlePlus = A0GooglePlusAuthenticator.newAuthenticatorWithClientId("G+_CLIENT_ID")

A0GooglePlusAuthenticator#newAuthenticatorWithClientId:andScopes

+ (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可以帮助您

  • 通过多个身份验证来源添加身份验证,例如社交媒体如谷歌、Facebook、微软账号、领英、GitHub、推特、Box、Salesforce等,或者企业身份系统如Windows Azure AD、谷歌应用、Active Directory、ADFS或任何SAML身份提供者
  • 通过传统的用户名/密码数据库添加身份验证。
  • 添加不同用户账号与同一用户的关联支持。
  • 为调用您的API和**安全地流转用户身份**而生成的签名JSON Web令牌
  • 分析用户登录的时间、地点和方式。
  • 通过JavaScript规则从其他来源提取数据并添加到用户档案中。

在Auth0中创建免费账户

  1. 访问Auth0并点击注册。
  2. 使用谷歌、GitHub或微软账号登录。

作者

Auth0

许可证

Lock-GooglePlus在MIT许可证下可用。有关更多信息,请参阅许可证文件