Authentication token generation WIP (#98)

You can now generate links to join chatrooms with your current user. This can be used to create Docks in OBS for example. This could also be used to generate authentication token to join the chat from 3rd party tools.
This commit is contained in:
John Livingston
2024-06-16 19:48:02 +02:00
parent e83150cf87
commit 90afdafbd9
24 changed files with 988 additions and 205 deletions

View File

@ -19,6 +19,7 @@ import { BotsCtl } from './lib/bots/ctl'
import { ExternalAuthOIDC } from './lib/external-auth/oidc'
import { migrateMUCAffiliations } from './lib/prosody/migration/migrateV10'
import { Emojis } from './lib/emojis'
import { LivechatProsodyAuth } from './lib/prosody/auth'
import decache from 'decache'
// FIXME: Peertube unregister don't have any parameter.
@ -51,6 +52,7 @@ async function register (options: RegisterServerOptions): Promise<any> {
await initSettings(options)
await Emojis.initSingleton(options) // after settings, before routes
await LivechatProsodyAuth.initSingleton(options)
await initCustomFields(options)
await initRouters(options)
@ -115,6 +117,7 @@ async function unregister (): Promise<any> {
await BotConfiguration.destroySingleton()
await ExternalAuthOIDC.destroySingletons()
await Emojis.destroySingleton()
await LivechatProsodyAuth.destroySingleton()
const module = __filename
OPTIONS?.peertubeHelpers.logger.info(`Unloading module ${module}...`)