首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用Amazon Cognito开发人员身份

使用Amazon Cognito开发人员身份
EN

Stack Overflow用户
提问于 2017-01-18 18:37:10
回答 1查看 194关注 0票数 5

我正在遵循亚马逊文档,但它并不像广告中所说的那样工作。我也有最新的sdk。下面的self.identity =代码不起作用,因为它是只读的。

代码语言:javascript
运行
复制
@implementation DeveloperAuthenticatedIdentityProvider
/*
 * Use the token method to communicate with your backend to get an
 * identityId and token.
 */

- (AWSTask <NSString*>) token {
    //Write code to call your backend:
    //Pass username/password to backend or some sort of token to authenticate user
    //If successful, from backend call getOpenIdTokenForDeveloperIdentity with logins map 
    //containing "your.provider.name":"enduser.username"
    //Return the identity id and token to client
    //You can use AWSTaskCompletionSource to do this asynchronously

    // Set the identity id and return the token
    self.identityId = response.identityId;
    return [AWSTask taskWithResult:response.token];
}

@end

我该如何重写它呢?谢谢。

EN

回答 1

Stack Overflow用户

发布于 2017-02-11 20:44:51

您的另一个问题中有编译器错误,请修复第一个Using AWS Cognito and aws-ios-sdk v.2.4.16 with developer identities

编译器建议的该方法的正确签名为

代码语言:javascript
运行
复制
- (AWSTask<NSString *> *)token;
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41717116

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档