Livekit.AccessToken (Livekit v0.1.4)
View SourceHandles generation and management of Livekit access tokens.
Summary
Functions
Adds a grant to the token.
Creates a new AccessToken with the given API key and secret.
Generates a JWT token string.
Verifies a JWT token and returns its claims.
Sets the grants for the token.
Sets the identity for the token.
Sets metadata for the token.
Sets the name for the token.
Sets the TTL (time to live) for the token in seconds.
Types
Functions
Adds a grant to the token.
Creates a new AccessToken with the given API key and secret.
Generates a JWT token string.
Verifies a JWT token and returns its claims.
Parameters
token: The JWT token to verifyapi_key: The API key to verify againstapi_secret: The API secret to verify with
Returns
{:ok, claims}: If the token is valid, returns the decoded claims{:error, reason}: If the token is invalid
Sets the grants for the token.
Sets the identity for the token.
Sets metadata for the token.
Sets the name for the token.
Sets the TTL (time to live) for the token in seconds.