|
LiveKit C++ Client SDK v1.4.0
Real-time audio/video/data SDK for C++
|
Token source that returns credentials you already created yourself. More...
#include <token_source.h>


Public Member Functions | |
| std::future< Result< TokenSourceResponse, TokenSourceError > > | fetch () override |
| Fetch connection credentials. | |
Static Public Member Functions | |
| static std::unique_ptr< LiteralTokenSource > | create (std::string server_url, std::string participant_token) |
| Create a token source from a static server URL and participant token. | |
| static std::unique_ptr< LiteralTokenSource > | create (std::function< std::future< Result< TokenSourceResponse, TokenSourceError > >()> provider) |
| Create a token source from an async provider that returns full credentials. | |
Token source that returns credentials you already created yourself.
Choose this when your app manually handles token creation/retrieval and you want the SDK to consume those credentials as-is ("literal" workflow). This class is ideal for quick prototypes, tests, and custom flows where you do not want the SDK to issue token-generation requests.
|
static |
Create a token source from an async provider that returns full credentials.
Use this overload when credentials are produced outside the SDK but fetched lazily (for example, from your own cache or secure storage).
| provider | Async provider that returns full connection credentials. |
provider.
|
static |
Create a token source from a static server URL and participant token.
Each fetch call returns the same credentials.
| server_url | WebSocket URL of the LiveKit server. |
| participant_token | JWT access token for the participant. |
|
overridevirtual |
Fetch connection credentials.
Implements livekit::TokenSourceFixed.