I'm a bit confused about the difference between an AWS session token and an AWS CognitoID, are they they same? because through this code
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc]
initWithRegionType:AWSRegionUSEast1
identityPoolId:@"my-identity-pool"];
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSUnknown credentialsProvider:credentialsProvider];
[AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
[[credentialsProvider getIdentityId] continueWithBlock:^id(AWSTask *task) {
if (task.error) {
NSLog(@"Error: %@", task.error);
}
else {
// the task result will contain the identity id
NSString *cognitoId = task.result;
// -------------------Outputs cognito Id------------------------
NSLog(@"%@,", task.result);
}
return nil;
}];
task.result gives back an AWS CognitoID but what about an AWS Session Token? How can I get it from my ios?
Aucun commentaire:
Enregistrer un commentaire