[英]Using Amazon Cognito Developer Identities
我正在关注亚马逊文档,但它不像宣传的那样工作。 我也有最新的sdk。 self.identity =下面的代码不起作用,因为它是只读的。
@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
我该如何纠正这个? 谢谢。
您的其他问题中存在编译器错误,首先使用AWS Cognito和aws-ios-sdk v.2.4.16修复这些错误与开发者身份
正如编译器所建议的那样,该方法的正确签名是
- (AWSTask<NSString *> *)token;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.