contra / fm-cloud-authentication
验证对FileMaker云服务器的数据API或管理API的访问
dev-master
2022-12-13 14:15 UTC
Requires
- php: 7.4.*||8.0.*||8.1.*
- aws/aws-sdk-php: ^3.198
- nesbot/carbon: ^2.53
- phpseclib/phpseclib: ^3.0
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is not auto-updated.
Last update: 2024-09-18 21:45:31 UTC
README
当使用自托管服务器时,FileMaker数据API使用相对简单的认证模式。向服务器发送有效的凭据,接收一个令牌,将此令牌用作后续请求的承载令牌。
然而,随着FileMaker Cloud 2的使用,通过使用Cognito,AWS凭据管理系统,这个过程变得更加复杂。这个库简化了该过程,使其与本地版本一样简单直接。
安装
composer require matatirosoln/fm-cloud-authentication
用法
$credentials = new \MSDev\FMCloudAuthenticator\Credentials( 'your-fm-cloud-server', 'your-fmrest-user', 'your-fmrest-password', \MSDev\FMCloudAuthenticator\Credentials::DAPI, 'your-database' ); $authenticator = new \MSDev\FMCloudAuthenticator\Authenticate(); $token = $authenticator->fetchToken($credentials);
$token
现在应该包含一个承载令牌,您可以使用它进行后续请求。
目前仅支持数据API,但我们计划将其扩展到管理API。
联系方式
有关更多详细信息,请参阅此 博客文章。
Steve Winter
Matatiro Solutions
steve@msdev.co.uk