【发布时间】:2018-01-05 21:39:33
【问题描述】:
我已经设置了更新用户属性的结构,在这种情况下,首选用户名用作登录的别名。
var attributes = [AWSCognitoIdentityUserAttributeType]()
let prefUsername = AWSCognitoIdentityUserAttributeType();
prefUsername?.name = "preferred_username";
prefUsername?.value = usernameField.text!;
attributes.append(prefUsername!);
let attributesRequest = AWSCognitoIdentityProviderUpdateUserAttributesRequest();
attributesRequest.userAttributes = attributes;
idProvider?.updateUserAttributes(attributesRequest)
唯一我不知道该怎么做的就是获取访问令牌。我已经查看了我能想到的尽可能多的文档,但我没有找到获得访问令牌的地方。
【问题讨论】:
标签: swift amazon-web-services amazon-cognito