livekit_token_source/lib.rs
1// Copyright 2026 LiveKit, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Token sources for the LiveKit Rust SDK.
16//!
17//! A token source procures the credentials — server URL and participant
18//! token — needed to join a LiveKit room. Construct one via the
19//! [`literal`] / [`endpoint`] / [`development_token_server`] factory
20//! functions, or implement [`TokenSourceFixed`] / [`TokenSourceConfigurable`]
21//! to plug in a custom credential backend.
22
23mod error;
24mod request;
25mod response;
26mod token_source;
27
28pub use error::TokenSourceError;
29pub use request::TokenSourceFetchOptions;
30pub use response::TokenSourceResponse;
31pub use response::TokenSourceResult;
32pub use token_source::development_token_server;
33pub use token_source::endpoint;
34pub use token_source::literal;
35pub use token_source::TokenSourceConfigurable;
36pub use token_source::TokenSourceDevelopmentTokenServer;
37pub use token_source::TokenSourceEndpoint;
38pub use token_source::TokenSourceFixed;
39pub use token_source::TokenSourceLiteral;