token

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package token provides join token types for OmniMeet.

Index

Constants

View Source
const DefaultTTL = 24 * time.Hour

DefaultTTL is the default token validity period.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRequest

type CreateRequest struct {
	// MeetingID is the ID of the meeting to join.
	MeetingID string `json:"meeting_id"`

	// Participant contains information about the participant.
	Participant participant.Info `json:"participant"`

	// TTL is how long the token should be valid (0 = default).
	TTL time.Duration `json:"ttl,omitempty"`

	// Metadata contains arbitrary key-value pairs.
	Metadata map[string]string `json:"metadata,omitempty"`

	// Extensions contains provider-specific configuration.
	Extensions map[string]any `json:"extensions,omitempty"`
}

CreateRequest contains the parameters for creating a join token.

type JoinToken

type JoinToken struct {
	// Token is the actual token string.
	Token string `json:"token"`

	// MeetingID is the ID of the meeting this token is for.
	MeetingID string `json:"meeting_id"`

	// ParticipantIdentity is the identity of the participant.
	ParticipantIdentity string `json:"participant_identity"`

	// ParticipantName is the display name of the participant.
	ParticipantName string `json:"participant_name"`

	// ExpiresAt is when the token expires.
	ExpiresAt time.Time `json:"expires_at"`

	// JoinURL is the full URL to join the meeting (if available).
	JoinURL string `json:"join_url,omitempty"`

	// Metadata contains additional token metadata.
	Metadata map[string]string `json:"metadata,omitempty"`
}

JoinToken represents an access token for joining a meeting.

func (*JoinToken) IsExpired

func (t *JoinToken) IsExpired() bool

IsExpired returns true if the token has expired.

func (*JoinToken) TTL

func (t *JoinToken) TTL() time.Duration

TTL returns the remaining time until the token expires.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL