LiveKit C++ Client SDK v1.4.0
Real-time audio/video/data SDK for C++
Loading...
Searching...
No Matches
livekit::SandboxTokenSource Class Referencefinal

Token source that uses LiveKit Cloud's sandbox token server (development only). More...

#include <token_source.h>

Inheritance diagram for livekit::SandboxTokenSource:
Collaboration diagram for livekit::SandboxTokenSource:

Public Member Functions

std::future< Result< TokenSourceResponse, TokenSourceError > > fetch (const TokenRequestOptions &options={}) override
 Fetch connection credentials.
 

Static Public Member Functions

static std::unique_ptr< SandboxTokenSourcecreate (const std::string &sandbox_id, const SandboxTokenServerOptions &options={})
 Create a token source backed by the LiveKit Cloud sandbox token server.
 

Friends

struct SandboxTokenSourceTestAccess
 

Detailed Description

Token source that uses LiveKit Cloud's sandbox token server (development only).

Use this for local development and quick testing when you do not yet have your own backend token endpoint. Do not use in production.

See also
https://docs.livekit.io/frontends/build/authentication/sandbox-token-server/

Member Function Documentation

◆ create()

static std::unique_ptr< SandboxTokenSource > livekit::SandboxTokenSource::create ( const std::string &  sandbox_id,
const SandboxTokenServerOptions options = {} 
)
static

Create a token source backed by the LiveKit Cloud sandbox token server.

Parameters
sandbox_idSandbox identifier from LiveKit Cloud (surrounding whitespace is trimmed).
optionsSandbox token server options.
Returns
A configurable token source backed by the sandbox token server.

◆ fetch()

std::future< Result< TokenSourceResponse, TokenSourceError > > livekit::SandboxTokenSource::fetch ( const TokenRequestOptions options = {})
overridevirtual

Fetch connection credentials.

Parameters
optionsConnection parameters encoded into the token request.
Returns
Future resolving to connection details or an error.

Implements livekit::TokenSourceConfigurable.


The documentation for this class was generated from the following file: