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

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

#include <token_source.h>

Inheritance diagram for livekit::DevelopmentTokenSource:
Collaboration diagram for livekit::DevelopmentTokenSource:

Public Member Functions

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

Static Public Member Functions

static std::unique_ptr< DevelopmentTokenSourcecreate (const std::string &token_server_id, const DevelopmentTokenServerOptions &options={})
 Create a token source backed by the LiveKit Cloud development token server.
 

Friends

struct DevelopmentTokenSourceTestAccess
 

Detailed Description

Token source that uses LiveKit Cloud's development 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< DevelopmentTokenSource > livekit::DevelopmentTokenSource::create ( const std::string &  token_server_id,
const DevelopmentTokenServerOptions options = {} 
)
static

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

Parameters
token_server_idDevelopment token server identifier from LiveKit Cloud (surrounding whitespace is trimmed).
optionsDevelopment token server options.
Returns
A configurable token source backed by the development token server.

◆ fetch()

std::future< Result< TokenSourceResponse, TokenSourceError > > livekit::DevelopmentTokenSource::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: