mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-12-01 19:47:06 -05:00
1.7 KiB
1.7 KiB
Configuration file
gamja can be configured using a config.json
file at the root. Example:
{
"server": {
"url": "wss://irc.example.org",
"autojoin": "#gamja"
},
"oauth2": {
"url": "https://auth.example.org",
"client_id": "asdf"
}
}
Errors while parsing the configuration file are logged in the browser's web console.
IRC server
The server
object configures the IRC server.
url
(string): WebSocket URL or path to connect to. Defaults to/socket
.autojoin
(string or array of strings): Channel(s) to automatically join after connecting.auth
(string): configure how the password UI is presented to the user. Set tomandatory
to require a password,optional
to accept one but not require it,disabled
to never ask for a password,external
to use SASL EXTERNAL,oauth2
to use SASL OAUTHBEARER. Defaults tooptional
.nick
(string): default nickname. If it contains a*
character, it will be replaced with a random string.autoconnect
(boolean): don't display the login UI, immediately connect to the serverping
(number): interval in seconds to send PING commands. Set to 0 to disable, this is the default. Enabling PINGs can have an impact on client power usage and should only be enabled if necessary.
OAuth 2.0
The oauth2
object configures OAuth 2.0 authentication.
url
(string): OAuth 2.0 server URL. The server must support OAuth 2.0 Authorization Server Metadata (RFC 8414) or OpenID Connect Discovery.client_id
(string): OAuth 2.0 client ID.client_secret
(string): OAuth 2.0 client secret.scope
(string): OAuth 2.0 scope.