Skip to main content

TavernLib.Backend.Auth

Every type in TavernLib.Backend.Auth, from TavernLib's own assembly. See the overview for how these pages are made.

TypeKindPublic membersWhat it is
AuthLimitsinternal class11Internal: per-address limits on the auth port and console logins. 8 failures, or 5 wrong passwords, each within 60 seconds of the last, hold an address off until 60 quiet seconds pass.
AuthLimits.Strikesprivate struct2Private: one address's failure count and when the last one was.
AuthManagerinternal class1Internal: TavernLib's login server on the auth port (1762 by default). Answers pings, mod lists, set_mods, whitelist applications and joins, registering new players in users.json. Server; not run with /launcherauth.
AuthPayloadsinternal static class0Internal: the JSON shapes the auth port reads and writes.
AuthPayloads.AuthenticateOkstruct1The answer to an accepted join: the player's user id, whether the Quest or tutorial scene is needed, and the game and web ports.
AuthPayloads.AuthenticateRequeststruct3A join request on the auth port: the player's name, account token and, if needed, password.
AuthPayloads.GenericFailstruct1Status error with a message, for every other refusal (blacklisted, name taken, too many attempts and so on).
AuthPayloads.ModsListResponsestruct1The answer to mods_list: the server's mods and enabled untracked mods, sent with a 4-byte big-endian length in front.
AuthPayloads.NeedsPasswordstruct0Status needs_password: the server has a password and the join gave none.
AuthPayloads.NotWhitelistedstruct0Status not_whitelisted, with the message Not Whitelisted.
AuthPayloads.Okstruct0A plain ok status, the answer to an accepted set_mods.
AuthPayloads.PingRequeststruct0A ping request. Any payload with a ping key is answered with a PingResponse.
AuthPayloads.PingResponsestruct1The auth port's answer to a ping: status pong, the server name, whether a password and the whitelist are on, the game, web and console ports, and the mods hash and count.
AuthPayloads.WhitelistApplicationReceivedstruct1Status whitelist_application_received, with already_pending true when the same name and address had already applied.
AuthPayloads.WrongPasswordstruct0Status wrong_password, with the message Wrong Password.
JoinRulesinternal static class5Internal: who may join, checked on the auth port and again at the game port, which a client can reach without the auth port.
ModParitystatic class6Checks a joining player's mods against the server's parity_required mods, behind the launcher's own pre-join check. Also builds the refusal the client recognises.
ModParity.RequiredModclass4One mod a joining player is missing or has the wrong version of, as sent in the refusal and written to last_rejection.json.