Skip to content

matatirosolutions/fm-cloud-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileMaker cloud authentication

The FileMaker Data API uses a realtively simple authentication pattern when using a self hosted server. Post valid credentials to the server, receive a token, use that as a bearer token for subsequent requests.

With FileMaker Cloud 2 however, the process is made somewhat more complex through the use of Cognito, the AWS credentials management system. This library simplifies that process to be as straight-forward as the on-premise version.

Installation

composer require matatirosoln/fm-cloud-authentication

Usage

$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 should now contain a bearer token which you can use for subsequent requests as usual.

At present only the Data API is supported, however we plan to extend this to the Admin API as well.

Contact

See this blog post for more details.

Steve Winter
Matatiro Solutions
[email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages