userbase/client

There is no license information available for the latest version (v1.5.0) of this package.

UserBase PHP Client: Identity + Login + Signup Service

v1.5.0 2019-02-12 15:33 UTC

README

About Userbase

Userbase is a micro-service with a REST/JSON API that manages users, organizations and api keys.

A Userbase Client can make calls to a Userbase Server authenticate users, get account details, etc.

Usage

Instantiate the client

Instantiate a new client object:

$url = 'https://joe:secret@userbase.example.com';
$client = new Client($url);

The provided credentials need to have "Admin" privileges on the Userbase Server.

Check credentials

if (!$client->checkCredentials('alice', 'shhhh')) {
  exit('Invalid credentials');
}
echo 'Welcome back!';

Testing/Development

The examples/ directory contains a few example scripts that you can use during testing and development.

First, copy the .env.dist file to .env. Edit the contents to match your Userbase server and credentials.

Then you can simply execute the examples like this:

php examples/checkcredentials.php alice sshhh

Please refer to the examples/ directory for other examples.

Integrations

Silex

A Silex Provider is available here

Symfony 4

A Symfony 4 bundle can be found here

License

MIT. Please refer to the license file for details.

Brought to you by the LinkORB Engineering team

687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67
Check out our other projects at linkorb.com/engineering.

Btw, we're hiring!