Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 为什么使用开发者身份或第三方通过后端进行身份验证_Ios_Objective C_Amazon Web Services_Parse Platform_Amazon Cognito - Fatal编程技术网

Ios 为什么使用开发者身份或第三方通过后端进行身份验证

Ios 为什么使用开发者身份或第三方通过后端进行身份验证,ios,objective-c,amazon-web-services,parse-platform,amazon-cognito,Ios,Objective C,Amazon Web Services,Parse Platform,Amazon Cognito,在Amazon Web Services提供的IOS SDK S3TransferManager示例中,我似乎可以访问像s3这样的AWS资源,而无需通过Facebook或Google这样的身份验证提供商。那么,如果我使用Parse,那么拥有自己的开发人员身份或通过后端而不是移动设备进行身份验证的目的是什么?例如,我相信Parse使用前端身份验证(在移动设备上)来验证用户,而不是使用他们的云代码服务()进行后端身份验证 难道我不能在前端使用parse对用户进行身份验证吗?如果成功,就将下面的代码复

在Amazon Web Services提供的IOS SDK S3TransferManager示例中,我似乎可以访问像s3这样的AWS资源,而无需通过Facebook或Google这样的身份验证提供商。那么,如果我使用Parse,那么拥有自己的开发人员身份或通过后端而不是移动设备进行身份验证的目的是什么?例如,我相信Parse使用前端身份验证(在移动设备上)来验证用户,而不是使用他们的云代码服务()进行后端身份验证

难道我不能在前端使用parse对用户进行身份验证吗?如果成功,就将下面的代码复制并通过成功块

// 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;

并且仍然可以访问我的aws资源。这样,我就不需要使用AWSCredentialsProvider协议,该协议需要从后端发送到我的应用程序的访问密钥、密钥和会话密钥。另外,IOS SDK似乎可以自行(自动)在手机上分配令牌会话,我的想法是正确的还是遗漏了什么?对于这一点我还是新手,如果我听起来很无知,那么很抱歉,

Cognito基于两种不同的作用域(未经验证和已验证)委托凭据。这些类型的用户的权限由unauth和auth角色定义,它们是使用所使用的标识池创建并链接到该标识池的。S3演示使用的是未经验证的用户,这就是为什么他们不需要某些提供商。如果您没有外部需求,只考虑使用Cognito作为凭证,那么您只需要未经验证的用户。他们自己工作。有关更多信息,请参阅

Cognito支持Facebook、Twitter、Digits、Amazon、Google、OIDC提供商和开发者身份验证身份来验证用户。如果您希望使用Parse对用户进行身份验证,则需要将其用作开发人员身份验证的提供者

不过,要明确的是,这并不意味着您的后端必须发送访问密钥/密钥…等等。到您的设备。更详细地介绍它,但应用程序会将登录凭据发送到您的后端。这个后端将验证这些,并从Cognito获得一个identityId/令牌。这些将被发送回设备,然后设备将发送回以获取访问AWS的凭据

// 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;