GrantTokenBuilder

Entry point for a grantToken(...) call. Inherits the shared ttl/meta/channels/ channelGroups setters from AbstractGrantTokenBuilder (returning this neutral builder so a chain can start with any of them).

From here two grant paths are available and cannot be combined:

The legacy uuids bucket and the getAllChannels/getAllUUIDs flags cannot be mixed with grants(...): UUIDGrant does not implement TokenGrant, the flat-list overload has no category flags, and combining them is rejected at request time.

Functions

Link copied to clipboard
abstract fun async(callback: Consumer<Result<Output>>)
Link copied to clipboard
abstract fun authorizedUserId(authorizedUserId: UserId): GrantTokenBuilder
Sets the authorized principal for the modern flat-list grant path.
Link copied to clipboard
abstract fun authorizedUUID(authorizedUUID: String): GrantTokenObjectsBuilder
Sets the authorized principal for a legacy (App Context v2 UUID) grant and enters the legacy grant path, where uuids(...) grants can be supplied.
Link copied to clipboard
abstract fun channelGroups(channelGroups: List<ChannelGroupGrant>): GrantTokenBuilder
Link copied to clipboard
abstract fun channels(channels: List<ChannelGrant>): GrantTokenBuilder
Link copied to clipboard
abstract fun getAllChannels(getAllChannels: Boolean): GrantTokenObjectsBuilder
Set to true to allow listing all channel metadata on the keyset (getAllChannelMetadata).
Link copied to clipboard
abstract fun getAllUUIDs(getAllUUIDs: Boolean): GrantTokenObjectsBuilder
Set to true to allow listing all uuid metadata on the keyset (getAllUUIDMetadata).
Link copied to clipboard
abstract fun grants(grants: List<TokenGrant>): GrantTokenBuilder
Supplies the flat list of grants for the modern grant path.
Link copied to clipboard
abstract fun meta(meta: Any): GrantTokenBuilder
Link copied to clipboard
Link copied to clipboard
abstract fun overrideConfiguration(configuration: PNConfiguration): Endpoint<T>

Allows to override certain configuration options (see com.pubnub.api.v2.PNConfigurationOverride.Builder) for this request only.

Link copied to clipboard
abstract fun retry()
Link copied to clipboard
abstract fun silentCancel()
Link copied to clipboard
abstract fun sync(): Output
Link copied to clipboard
abstract fun ttl(ttl: Integer): GrantTokenBuilder
Link copied to clipboard