Documentation

GrantToken extends Endpoint
in package

Table of Contents

Constants

RESPONSE_IS_JSON  = true
PATH  = '/v3/pam/%s/grant'

Properties

$authorizedUuid  : string
$cachedTransports  : array<string|int, mixed>
$customHost  : mixed
$envelope  : PNEnvelope
$followRedirects  : mixed
$meta  : mixed
$patterns  : array<string|int, string>
$pubnub  : PubNub
$resources  : array<string|int, string>
$sortParams  : bool
$ttl  : int
$channels  : mixed
$groups  : mixed
$uuids  : mixed

Methods

__construct()  : mixed
addChannelGroupPatterns()  : mixed
addChannelGroupResources()  : mixed
addChannelPatterns()  : mixed
addChannelResources()  : mixed
addUuidPatterns()  : mixed
addUuidResources()  : mixed
authorizedUuid()  : $this
buildData()  : null
buildPath()  : string
channels()  : $this
clear()  : mixed
Clear cached envelope
createResponse()  : PNAccessManagerGrantResult
customParams()  : array<string|int, mixed>
envelope()  : PNEnvelope
Returns an Envelope that contains both result and status.
getConnectTimeout()  : int
getOperationType()  : int
getRequestTimeout()  : int
groups()  : $this
httpMethod()  : string
isAuthRequired()  : bool
meta()  : mixed
parseToken()  : mixed
sync()  : PNAccessManagerGrantResult
Return a Result only.
ttl()  : $this
Set time in minutes for which granted permissions are valid
uuids()  : $this
validateParams()  : mixed
buildParams()  : array<string|int, mixed>
Params build flow: signed <- custom <- default
customHeaders()  : mixed
defaultHeaders()  : mixed
defaultParams()  : array<string|int, mixed>
fetchPayload()  : array<string|int, mixed>
getAffectedChannelGroups()  : mixed
getAffectedChannels()  : mixed
getAffectedUsers()  : mixed
getName()  : string
getTransport()  : mixed
invokeRequest()  : PNEnvelope
invokeRequestAndCacheIt()  : PNEnvelope
requestOptions()  : array<string|int, mixed>
validateChannelGroups()  : mixed
validatePublishKey()  : mixed
validateSecretKey()  : mixed
validateSubscribeKey()  : mixed
addPatterns()  : mixed
addResources()  : mixed
createStatus()  : PNStatus
getDefaultTransport()  : Transport
parsePermissions()  : mixed

Constants

RESPONSE_IS_JSON

protected mixed RESPONSE_IS_JSON = true

Properties

$authorizedUuid

protected string $authorizedUuid

$cachedTransports

protected static array<string|int, mixed> $cachedTransports = []

$customHost

protected mixed $customHost = null

$followRedirects

protected mixed $followRedirects = true

$patterns

protected array<string|int, string> $patterns = []

$resources

protected array<string|int, string> $resources = []

Methods

__construct()

public __construct(PubNub $pubnubInstance) : mixed
Parameters
$pubnubInstance : PubNub

addChannelGroupPatterns()

public addChannelGroupPatterns(mixed $res) : mixed
Parameters
$res : mixed

addChannelGroupResources()

public addChannelGroupResources(mixed $res) : mixed
Parameters
$res : mixed

addChannelPatterns()

public addChannelPatterns(mixed $res) : mixed
Parameters
$res : mixed

addChannelResources()

public addChannelResources(mixed $res) : mixed
Parameters
$res : mixed

addUuidPatterns()

public addUuidPatterns(mixed $res) : mixed
Parameters
$res : mixed

addUuidResources()

public addUuidResources(mixed $res) : mixed
Parameters
$res : mixed

authorizedUuid()

public authorizedUuid(string $uuid) : $this
Parameters
$uuid : string
Return values
$this

buildData()

public buildData() : null
Return values
null

buildPath()

public buildPath() : string
Return values
string

channels()

public channels(string|array<string|int, string> $channels) : $this
Parameters
$channels : string|array<string|int, string>
Return values
$this

clear()

Clear cached envelope

public clear() : mixed

customParams()

public customParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

envelope()

Returns an Envelope that contains both result and status.

public envelope() : PNEnvelope

All Errors are wrapped, so no need to use try/catch blocks

Return values
PNEnvelope

getConnectTimeout()

public getConnectTimeout() : int
Return values
int

getOperationType()

public getOperationType() : int
Return values
int

getRequestTimeout()

public getRequestTimeout() : int
Return values
int

groups()

public groups(string|array<string|int, string> $groups) : $this
Parameters
$groups : string|array<string|int, string>
Return values
$this

httpMethod()

public httpMethod() : string
Return values
string

isAuthRequired()

public isAuthRequired() : bool
Return values
bool

meta()

public meta(mixed $meta) : mixed
Parameters
$meta : mixed

parseToken()

public parseToken(mixed $token) : mixed
Parameters
$token : mixed

ttl()

Set time in minutes for which granted permissions are valid

public ttl(int $value) : $this

Max: 525600 Min: 1 Default: 1440

Setting 0 will apply the grant indefinitely (forever grant).

Parameters
$value : int
Return values
$this

uuids()

public uuids(string|array<string|int, string> $uuids) : $this
Parameters
$uuids : string|array<string|int, string>
Return values
$this

buildParams()

Params build flow: signed <- custom <- default

protected buildParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

customHeaders()

protected customHeaders() : mixed

defaultHeaders()

protected defaultHeaders() : mixed

defaultParams()

protected defaultParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

fetchPayload()

protected static fetchPayload(mixed $json) : array<string|int, mixed>
Parameters
$json : mixed
Tags
throws
PubNubResponseParsingException
Return values
array<string|int, mixed>

getAffectedChannelGroups()

protected getAffectedChannelGroups() : mixed

getAffectedChannels()

protected getAffectedChannels() : mixed

getAffectedUsers()

protected getAffectedUsers() : mixed

getName()

protected getName() : string
Return values
string

getTransport()

protected getTransport() : mixed

requestOptions()

protected requestOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

validateChannelGroups()

protected validateChannelGroups(array<string|int, string>|string $channels, array<string|int, string>|string $groups) : mixed
Parameters
$channels : array<string|int, string>|string
$groups : array<string|int, string>|string
Tags
throws
PubNubValidationException

addPatterns()

private addPatterns(mixed $type, mixed $res) : mixed
Parameters
$type : mixed
$res : mixed

addResources()

private addResources(mixed $type, mixed $res) : mixed
Parameters
$type : mixed
$res : mixed

parsePermissions()

private parsePermissions(mixed $permissions) : mixed
Parameters
$permissions : mixed

        
On this page

Search results