

2张图片
作者
描述
在您的iPhone或iPad应用中进行Box用户认证的一个简单快速的解决方案。
快速操作指南
创建一个BoxSimpleOAuthViewController实例,并传入Box客户端ID、客户端密钥、客户端回调URL以及一个完成块,该完成块带有BoxLoginResponse和NSError参数执行。
一旦BoxSimpleOAuthViewController实例被显示(无论是作为模态还是推到导航堆栈中),它将允许用户登录。用户登录后,初始化视控制器时提供的完成块将被执行。完成块中的参数,BoxLoginResponse,包含由Box API响应提供的认证用户的authToken和其他登录信息。如果尝试认证存在问题,将提供错误。