ray / auth0-module
auth0 module for Ray.Di
Installs: 182 226
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- auth0/auth0-php: ^8.7
- guzzlehttp/guzzle: ^7.7
- josegonzalez/dotenv: ^3.2
- koriym/http-constants: ^1.2
- nyholm/psr7: ^1.8
- ray/aura-web-module: ^0.1.0
- ray/di: ^2.15
Requires (Dev)
- doctrine/annotations: ^1.8
- friendsofphp/php-cs-fixer: ^2.11
- phpmd/phpmd: ^2.6
- phpstan/phpstan: ^0.12.5
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.2
README
Installation
Composer install
$ composer require ray/auth0-module
Module install
use Ray\Di\AbstractModule; use Ray\Auth0Module\Auth0Module; class AppModule extends AbstractModule { protected function configure() { $this->install(new Auth0Module([ 'domain' => getenv('AUTH0_DOMAIN'), 'clientId' => getenv('AUTH0_MANAGEMENT_CLIENT_ID'), 'clientSecret' => getenv('AUTH0_MANAGEMENT_CLIENT_SECRET'), 'cookieSecret' => getenv('AUTH0_MANAGEMENT_COOKIE_SECRET'), ])); } }
Usage
class User extends ResourceObject { public function __construct() { private Management $managementClient; }() public function onPost(): static { // .... $this->managementClient->users()->create([ 'connection' => CONNECTION_NAME, 'email' => $email, 'email_verified' => true, 'name' => $name, 'password' => $initialPassword, ]); }
See more at https://github.com/auth0/Auth0-PHP