@abstract class_name AuthProvider extends RefCounted ## How the server learns who a client is. ## ## Modelled on Steamworks deliberately, so swapping to it later is one subclass ## and no schema change: the client obtains an opaque ticket, sends it with the ## handshake, and the server validates it into a stable 64-bit account id -- ## exactly the shape of GetAuthSessionTicket / BeginAuthSession / SteamID64. ## ## The account id is the only identity anything downstream sees. Nothing stores ## a ticket, and nothing outside a provider interprets one. ## Reserved: never a valid account. const NO_ACCOUNT := 0 ## Client side: a ticket to present at handshake. @abstract func get_ticket() -> PackedByteArray ## Server side: validate a ticket and return the account it proves, or ## NO_ACCOUNT to reject the connection. @abstract func validate(ticket: PackedByteArray) -> int ## Human-readable, for logs and for the connect screen. @abstract func provider_name() -> String