Versions in this module Expand all Collapse all v0 v0.12.1 Mar 23, 2022 Changes in this version + var ErrKeysMissing = errors.New("missing API key or secret key") + type APIKeyTokenVerifier struct + func ParseAPIToken(raw string) (*APIKeyTokenVerifier, error) + func (v *APIKeyTokenVerifier) APIKey() string + func (v *APIKeyTokenVerifier) Identity() string + func (v *APIKeyTokenVerifier) Verify(key interface{}) (*ClaimGrants, error) + type AccessToken struct + func NewAccessToken(key string, secret string) *AccessToken + func (t *AccessToken) AddGrant(grant *VideoGrant) *AccessToken + func (t *AccessToken) SetIdentity(identity string) *AccessToken + func (t *AccessToken) SetMetadata(md string) *AccessToken + func (t *AccessToken) SetName(name string) *AccessToken + func (t *AccessToken) SetSha256(sha string) *AccessToken + func (t *AccessToken) SetValidFor(duration time.Duration) *AccessToken + func (t *AccessToken) ToJWT() (string, error) + type ClaimGrants struct + Identity string + Metadata string + Name string + Sha256 string + Video *VideoGrant + type FileBasedKeyProvider struct + func NewFileBasedKeyProviderFromMap(keys map[string]string) *FileBasedKeyProvider + func NewFileBasedKeyProviderFromReader(r io.Reader) (p *FileBasedKeyProvider, err error) + func (p *FileBasedKeyProvider) GetSecret(key string) string + func (p *FileBasedKeyProvider) NumKeys() int + type KeyProvider interface + GetSecret func(key string) string + NumKeys func() int + type TokenVerifier interface + Identity func() string + Verify func(key interface{}) (*ClaimGrants, error) + type VideoGrant struct + CanPublish *bool + CanPublishData *bool + CanSubscribe *bool + Hidden bool + Recorder bool + Room string + RoomAdmin bool + RoomCreate bool + RoomJoin bool + RoomList bool + RoomRecord bool + func (v *VideoGrant) GetCanPublish() bool + func (v *VideoGrant) GetCanPublishData() bool + func (v *VideoGrant) GetCanSubscribe() bool + func (v *VideoGrant) SetCanPublish(val bool) + func (v *VideoGrant) SetCanPublishData(val bool) + func (v *VideoGrant) SetCanSubscribe(val bool) + func (v *VideoGrant) ToPermission() *livekit.ParticipantPermission