Interface ILiveKitTokenService
- Namespace
- LiveKit.Authentication
- Assembly
- LiveKit.AspNetCore.ServerSdk.Abstractions.dll
Service for creating LiveKit authentication tokens.
Provides methods for generating JWT tokens for participant authentication and server API access. See LiveKit Authentication Documentation for more information.
public interface ILiveKitTokenService
Methods
CreateServerToken(string?, TimeSpan?)
Creates a server token for API calls.
string CreateServerToken(string? roomName = null, TimeSpan? ttl = null)
Parameters
Returns
CreateServerToken(string?, TimeSpan?, string?)
Creates a server token for API calls that forward or move a participant to another room.
string CreateServerToken(string? roomName, TimeSpan? ttl, string? destinationRoom)
Parameters
roomNamestringThe room the token grants access to, if any.
ttlTimeSpan?The token time-to-live. Defaults to 5 minutes.
destinationRoomstringThe room a participant can be forwarded or moved to, if any.
Returns
CreateTokenBuilder(string)
Creates a token builder for the specified identity.
ILiveKitTokenBuilder CreateTokenBuilder(string identity)
Parameters
identitystring