Documentation

Grant extends Endpoint
in package

Table of Contents

Constants

PATH  = "/v2/auth/grant/sub-key/%s"
RESPONSE_IS_JSON  = true

Properties

$authKeys  : array<string|int, string>
$cachedTransports  : array<string|int, mixed>
$channels  : array<string|int, string>
$customHost  : mixed
$delete  : bool
$envelope  : PNEnvelope
$followRedirects  : mixed
$get  : bool
$groups  : array<string|int, string>
$join  : bool
$manage  : bool
$pubnub  : PubNub
$read  : bool
$ttl  : int
$update  : bool
$uuids  : array<string|int, string>
$write  : bool

Methods

__construct()  : mixed
authKeys()  : $this
buildData()  : null
buildPath()  : string
channelGroups()  : $this
channels()  : $this
clear()  : mixed
Clear cached envelope
createResponse()  : PNAccessManagerGrantResult
customParams()  : array<string|int, mixed>
delete()  : $this
envelope()  : PNEnvelope
Returns an Envelope that contains both result and status.
get()  : $this
getAffectedChannelGroups()  : array<string|int, string>
getAffectedChannels()  : array<string|int, string>
getAffectedUsers()  : array<string|int, string>
getConnectTimeout()  : int
getName()  : string
getOperationType()  : int
getRequestTimeout()  : int
httpMethod()  : string
isAuthRequired()  : bool
join()  : $this
manage()  : $this
read()  : $this
sync()  : PNAccessManagerGrantResult
Return a Result only.
ttl()  : $this
Set time in minutes for which granted permissions are valid
update()  : $this
uuids()  : $this
validateParams()  : mixed
write()  : $this
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>
getTransport()  : mixed
invokeRequest()  : PNEnvelope
invokeRequestAndCacheIt()  : PNEnvelope
requestOptions()  : array<string|int, mixed>
validateChannelGroups()  : mixed
validatePublishKey()  : mixed
validateSecretKey()  : mixed
validateSubscribeKey()  : mixed
createStatus()  : PNStatus
getDefaultTransport()  : Transport

Constants

PATH

public mixed PATH = "/v2/auth/grant/sub-key/%s"

RESPONSE_IS_JSON

protected mixed RESPONSE_IS_JSON = true

Properties

$authKeys

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

$cachedTransports

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

$channels

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

$customHost

protected mixed $customHost = null

$delete

protected bool $delete

$followRedirects

protected mixed $followRedirects = true

$groups

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

$manage

protected bool $manage

$update

protected bool $update

$uuids

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

$write

protected bool $write

Methods

__construct()

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

authKeys()

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

buildData()

public buildData() : null
Return values
null

buildPath()

public buildPath() : string
Return values
string

channelGroups()

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

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>

delete()

public delete(bool $flag) : $this
Parameters
$flag : bool
Return values
$this

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

get()

public get(bool $flag) : $this
Parameters
$flag : bool
Return values
$this

getAffectedChannelGroups()

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

getAffectedChannels()

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

getAffectedUsers()

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

getConnectTimeout()

public getConnectTimeout() : int
Return values
int

getName()

public getName() : string
Return values
string

getOperationType()

public getOperationType() : int
Return values
int

getRequestTimeout()

public getRequestTimeout() : int
Return values
int

httpMethod()

public httpMethod() : string
Return values
string

isAuthRequired()

public isAuthRequired() : bool
Return values
bool

join()

public join(bool $flag) : $this
Parameters
$flag : bool
Return values
$this

manage()

public manage(bool $flag) : $this
Parameters
$flag : bool
Return values
$this

read()

public read(bool $flag) : $this
Parameters
$flag : bool
Return values
$this

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

update()

public update(bool $flag) : $this
Parameters
$flag : bool
Return values
$this

uuids()

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

write()

public write(bool $flag) : $this
Parameters
$flag : bool
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>

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

        
On this page

Search results