jeudi 30 juillet 2015

Why use Developer identity or third party to authenticate via backend

In the IOS SDK S3TransferManager Sample provided as an example by Amazon Web Services it looks as if I can access AWS resources like s3 without having to go through authentication providers like Facebook or Google. So what is the purpose of having my own developer identity or authenticating through the backend instead of on mobile if I'm using Parse? For example I believe Parse uses front end authentication (on mobile) to authenticate users rather than using Cloud Code (http://ift.tt/1eDSI03)

"Cloud Code is easy to use because it's built on the same JavaScript 
SDK that powers thousands of apps. The only difference is that this  
code runs in the Parse Cloud rather than running on a mobile device."

couldn't I just authenticate users with parse on the front end and when succeeded just copy and past this code below into the success block?

// Authenticate with Parse and if authentication succeeded execute code below
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc]
                                                      initWithRegionType:AWSRegionUSEast1
                                                      identityPoolId:@"identity-pool"];

AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:credentialsProvider];

[AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;

and still have access to my aws resources. That way I don't need to use the AWSCredentialsProvider protocol that needs the access key, secret key, and session key sent to my app from the backend. Plus it seems like the IOS SDK manages allocating token sessions by itself (automatically) on mobile, is my thinking correct or am I missing something? still new to this so sorry if I sound ignorant




Aucun commentaire:

Enregistrer un commentaire