https://github.com/warrant-dev/warrant-php
PHP Client SDK for Warrant
https://github.com/warrant-dev/warrant-php
abac access-control acl authorization permissions php rbac role-based-access-control
Last synced: 12 months ago
JSON representation
PHP Client SDK for Warrant
- Host: GitHub
- URL: https://github.com/warrant-dev/warrant-php
- Owner: warrant-dev
- License: mit
- Created: 2022-09-21T05:47:01.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-03T19:09:26.000Z (about 2 years ago)
- Last Synced: 2025-04-13T21:14:13.331Z (about 1 year ago)
- Topics: abac, access-control, acl, authorization, permissions, php, rbac, role-based-access-control
- Language: PHP
- Homepage:
- Size: 20.5 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Warrant PHP SDK
Use [Warrant](https://warrant.dev/) in PHP projects.
[](https://packagist.org/packages/warrant-dev/warrant-php)
[](https://packagist.org/packages/warrant-dev/warrant-php)
## Installation
Install the SDK using [Composer](https://getcomposer.org/):
```sh
composer require warrant-dev/warrant-php
```
Include the SDK using Composer's autoload:
```php
require_once('vendor/autoload.php');
```
## Usage
Import the Warrant client and pass your API key to the constructor to get started:
```js
$warrant = new \Warrant\Client(
new \Warrant\Config("api_test_f5dsKVeYnVSLHGje44zAygqgqXiLJBICbFzCiAg1E=")
);
$newUser = $warrant->createUser(new \Warrant\User("my-user-id"));
```
We’ve used a random API key in these code examples. Replace it with your
[actual publishable API keys](https://app.warrant.dev) to
test this code through your own Warrant account.
For more information on how to use the Warrant API, please refer to the
[Warrant API reference](https://docs.warrant.dev).
## Warrant Documentation
- [Warrant Docs](https://docs.warrant.dev/)