File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -282,15 +282,39 @@ export class TokenSourceSandboxTokenServer extends TokenSourceEndpoint {
282282}
283283
284284export const TokenSource = {
285+ /** TokenSource.literal contains a single, literal set of credentials. */
285286 literal ( literalOrFn : LiteralOrFn ) {
286287 return new TokenSourceLiteral ( literalOrFn ) ;
287288 } ,
289+
290+ /**
291+ * TokenSource.custom allows a user to define a manual function which generates new
292+ * {@link ResponsePayload} values on demand.
293+ *
294+ * Use this to get credentials from custom backends / etc.
295+ */
288296 custom ( customFn : CustomFn ) {
289297 return new TokenSourceCustom ( customFn ) ;
290298 } ,
299+
300+ /**
301+ * TokenSource.endpoint creates a token source that fetches credentials from a given URL using
302+ * the standard endpoint format:
303+ * FIXME: add docs link here in the future!
304+ */
291305 endpoint ( url : string , options : EndpointOptions = { } ) {
292306 return new TokenSourceEndpoint ( url , options ) ;
293307 } ,
308+
309+ /**
310+ * TokenSource.sandboxTokenServer queries a sandbox token server for credentials,
311+ * which supports quick prototyping / getting started types of use cases.
312+ *
313+ * This token provider is INSECURE and should NOT be used in production.
314+ *
315+ * For more info:
316+ * @see https://cloud.livekit.io/projects/p_/sandbox/templates/token-server
317+ */
294318 sandboxTokenServer ( options : SandboxTokenServerOptions ) {
295319 return new TokenSourceSandboxTokenServer ( options ) ;
296320 } ,
You can’t perform that action at this time.
0 commit comments