DeviceAuthorization
Less than 1 minute
DeviceAuthorization
class DeviceAuthorizationConstants
STATUS_PENDING
public const STATUS_PENDING = 'pending'STATUS_APPROVED
public const STATUS_APPROVED = 'approved'STATUS_DENIED
public const STATUS_DENIED = 'denied'Properties
deviceCode
public readonly string $deviceCodeType: string
userCode
public readonly string $userCodeType: string
clientId
public readonly string $clientIdType: string
scope
public readonly array $scopeType: array
resource
public readonly string $resourceType: string
expiresAt
public readonly int $expiresAtType: int
interval
public readonly int $intervalType: int
status
public readonly string $status = 'self::STATUS_PENDING'Type: string
userIdentity
public readonly string $userIdentityType: string
lastPolledAt
public readonly int $lastPolledAtType: int
Methods
__construct
public __construct(string $deviceCode, string $userCode, string $clientId, array $scope, string $resource, int $expiresAt, int $interval, string $status = 'self::STATUS_PENDING', string $userIdentity, int $lastPolledAt): voidParameters
| Parameter | Type | Description |
|---|---|---|
$deviceCode | string | |
$userCode | string | |
$clientId | string | |
$scope | array | |
$resource | string | |
$expiresAt | int | |
$interval | int | |
$status | string | |
$userIdentity | string | |
$lastPolledAt | int |
isExpired
public isExpired(): boolReturns: bool
isPending
public isPending(): boolReturns: bool
approve
public approve(string $userIdentity, array $scope): selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$userIdentity | string | |
$scope | array | the scope the user actually granted |
deny
public deny(): selfReturns: self
polled
public polled(int $at, ?int $interval): selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$at | int | |
$interval | int |
Generated by Hazaar API Doc Generator on Thu, 22 Oct 2026 05:05:28 +0000