userbase / client
UserBase PHP Client: Identity + Login + Signup Service
Installs: 7 016
Dependents: 2
Suggesters: 1
Security: 0
Stars: 5
Watchers: 4
Forks: 5
Open Issues: 2
Requires
- php: >=8.0.2
- ext-curl: *
- linkorb/userbase-role-contracts: ^2.0
- psr/cache: ~1.0 || ^2.0 || ^3.0
- symfony/cache: ^5.4 || ^6.0
- symfony/event-dispatcher-contracts: ^2.0 || ^3.0.0
- symfony/security-core: ^5.4 || ^6.0
- dev-master
- v3.2.1
- v3.2.0
- v3.1.0
- v3.0.0
- v2.x-dev
- v2.2.0
- v2.1.1
- v2.1.0
- v2.0.2
- v2.0.1
- v2.0.0
- v1.12.0
- v1.11.0
- v1.10.0
- v1.9.0
- v1.8.0
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.0
- v1.0.0
- v0.14.0
- v0.13.1
- v0.13.0
- v0.12.0
- v0.11.1
- v0.11.0
- v0.10.0
- v0.9.0
- v0.8.0
- v0.7.2
- v0.7.1
- v0.7.0
- V0.6.2
- v0.6.1
- v0.6.0
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.0
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.1
- v0.1.0
This package is auto-updated.
Last update: 2024-11-05 15:42:01 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.
cp .env.dist .env e edit .env # Edit configuration, database settings etc ./vendor/bin/envoi validate # Run command validate based on meta file .env.yaml
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
A Symfony bundle can be found here. It works with Symfony 4 and 5 projects.
License
MIT. Please refer to the license file for details.
Brought to you by the LinkORB Engineering team
Check out our other projects at linkorb.com/engineering.
Btw, we're hiring!