Management.php in Auth0 Single Sign On 8.2
File
vendor/auth0/auth0-php/src/API/Management.php
View source
<?php
namespace Auth0\SDK\API;
use Auth0\SDK\API\Management\Blacklists;
use Auth0\SDK\API\Management\Clients;
use Auth0\SDK\API\Management\ClientGrants;
use Auth0\SDK\API\Management\Connections;
use Auth0\SDK\API\Management\DeviceCredentials;
use Auth0\SDK\API\Management\Emails;
use Auth0\SDK\API\Management\EmailTemplates;
use Auth0\SDK\API\Management\Grants;
use Auth0\SDK\API\Management\Jobs;
use Auth0\SDK\API\Management\Logs;
use Auth0\SDK\API\Management\ResourceServers;
use Auth0\SDK\API\Management\Roles;
use Auth0\SDK\API\Management\Rules;
use Auth0\SDK\API\Management\Stats;
use Auth0\SDK\API\Management\Tenants;
use Auth0\SDK\API\Management\Tickets;
use Auth0\SDK\API\Management\UserBlocks;
use Auth0\SDK\API\Management\Users;
use Auth0\SDK\API\Management\UsersByEmail;
use Auth0\SDK\API\Helpers\ApiClient;
use Auth0\SDK\API\Header\Authorization\AuthorizationBearer;
class Management {
private $token;
private $domain;
private $apiClient;
private $guzzleOptions;
private $returnType;
public $blacklists;
public $clients;
public $client_grants;
public $connections;
public $deviceCredentials;
public $emails;
public $emailTemplates;
public $jobs;
public $grants;
public $logs;
public $roles;
public $rules;
public $resource_servers;
public $stats;
public $tenants;
public $tickets;
public $userBlocks;
public $users;
public $usersByEmail;
public function __construct($token, $domain, $guzzleOptions = [], $returnType = null) {
$this->token = $token;
$this->domain = $domain;
$this->guzzleOptions = $guzzleOptions;
$this->returnType = $returnType;
$this
->setApiClient();
$this->blacklists = new Blacklists($this->apiClient);
$this->clients = new Clients($this->apiClient);
$this->client_grants = new ClientGrants($this->apiClient);
$this->connections = new Connections($this->apiClient);
$this->deviceCredentials = new DeviceCredentials($this->apiClient);
$this->emails = new Emails($this->apiClient);
$this->emailTemplates = new EmailTemplates($this->apiClient);
$this->grants = new Grants($this->apiClient);
$this->jobs = new Jobs($this->apiClient);
$this->logs = new Logs($this->apiClient);
$this->roles = new Roles($this->apiClient);
$this->rules = new Rules($this->apiClient);
$this->resource_servers = new ResourceServers($this->apiClient);
$this->stats = new Stats($this->apiClient);
$this->tenants = new Tenants($this->apiClient);
$this->tickets = new Tickets($this->apiClient);
$this->userBlocks = new UserBlocks($this->apiClient);
$this->users = new Users($this->apiClient);
$this->usersByEmail = new UsersByEmail($this->apiClient);
}
public function blacklists() {
if (!$this->blacklists instanceof Blacklists) {
$this->blacklists = new Blacklists($this->apiClient);
}
return $this->blacklists;
}
public function clients() {
if (!$this->clients instanceof Clients) {
$this->clients = new Clients($this->apiClient);
}
return $this->clients;
}
public function clientGrants() {
if (!$this->client_grants instanceof ClientGrants) {
$this->client_grants = new ClientGrants($this->apiClient);
}
return $this->client_grants;
}
public function connections() {
if (!$this->connections instanceof Connections) {
$this->connections = new Connections($this->apiClient);
}
return $this->connections;
}
public function deviceCredentials() {
if (!$this->deviceCredentials instanceof DeviceCredentials) {
$this->deviceCredentials = new DeviceCredentials($this->apiClient);
}
return $this->deviceCredentials;
}
public function emails() {
if (!$this->emails instanceof Emails) {
$this->emails = new Emails($this->apiClient);
}
return $this->emails;
}
public function emailTemplates() {
if (!$this->emailTemplates instanceof EmailTemplates) {
$this->emailTemplates = new EmailTemplates($this->apiClient);
}
return $this->emailTemplates;
}
public function grants() {
if (!$this->grants instanceof Grants) {
$this->grants = new Grants($this->apiClient);
}
return $this->grants;
}
public function jobs() {
if (!$this->jobs instanceof Jobs) {
$this->jobs = new Jobs($this->apiClient);
}
return $this->jobs;
}
public function logs() {
if (!$this->logs instanceof Logs) {
$this->logs = new Logs($this->apiClient);
}
return $this->logs;
}
public function roles() {
if (!$this->roles instanceof Roles) {
$this->roles = new Roles($this->apiClient);
}
return $this->roles;
}
public function rules() {
if (!$this->rules instanceof Rules) {
$this->rules = new Rules($this->apiClient);
}
return $this->rules;
}
public function resourceServers() {
if (!$this->resource_servers instanceof ResourceServers) {
$this->resource_servers = new ResourceServers($this->apiClient);
}
return $this->resource_servers;
}
public function stats() {
if (!$this->stats instanceof Stats) {
$this->stats = new Stats($this->apiClient);
}
return $this->stats;
}
public function tenants() {
if (!$this->tenants instanceof Tenants) {
$this->tenants = new Tenants($this->apiClient);
}
return $this->tenants;
}
public function tickets() {
if (!$this->tickets instanceof Tickets) {
$this->tickets = new Tickets($this->apiClient);
}
return $this->tickets;
}
public function userBlocks() {
if (!$this->userBlocks instanceof UserBlocks) {
$this->userBlocks = new UserBlocks($this->apiClient);
}
return $this->userBlocks;
}
public function users() {
if (!$this->users instanceof Users) {
$this->users = new Users($this->apiClient);
}
return $this->users;
}
public function usersByEmail() {
if (!$this->usersByEmail instanceof UsersByEmail) {
$this->usersByEmail = new UsersByEmail($this->apiClient);
}
return $this->usersByEmail;
}
protected function setApiClient() {
$apiDomain = "https://{$this->domain}";
$client = new ApiClient([
'domain' => $apiDomain,
'basePath' => '/api/v2/',
'guzzleOptions' => $this->guzzleOptions,
'returnType' => $this->returnType,
'headers' => [
new AuthorizationBearer($this->token),
],
]);
$this->apiClient = $client;
}
}