====== S2C Packet 1.n: Authorization Failure ====== Informs the client that its authorization attempt failed and why. This packet or [[sockchat:s2c:authz-success|S2C Packet 1.y: Authorization Success]] can only occur once per connection. ===== Format ===== ^ Index ^ Type ^ Description ^ | 0 | ''%%1%%'' | Authz/User Add packet ID | | 1 | ''%%n%%'' | Authz failed packet ID | | 2 | [[sockchat:types#string|string]] | Reason string, listed below | | 3 ((Only present went the reason string is ''%%joinfail%%'')) | [[sockchat:types#timestamp|timestamp]] | Timestamp at which the client can attempt authorization again. | ===== Reason strings ===== ^ String ^ Description ^ | ''%%authfail%%'' | Provided credentials have expired or were never valid to begin with. | | ''%%joinfail%%'' | Authorization succeeded, but the authenticated user is banned. Third field will contain expiration timestamp. | | ''%%sockfail%%'' | Current connection is already associated with another user. ((Original server implementation did not allow users to have more than a single connection. Newer implementations do allow this and issue this reason when an implementation defined connection limit is reached.)) | | ''%%userfail%%'' | Another user with the same user name is already connected. ((Original server implementation did not allow users to have more than a single connection. Newer implementations use this as a generic fallback error.)) | ===== Examples ===== Expired credentials: 1\tn\tauthfail Authorized client is banned until Sunday, 13 April 2025 21:45:55 GMT: 1\tn\tjoinfail\t1744580755 Authorized client has too many active connections: 1\tn\tsockfail Something went wrong while verifying credentials: 1\tn\tuserfail ===== See Also ===== * [[sockchat:c2s:authz-attempt|C2S Packet 1: Authorization Attempt]] - Client authorization attempt, this packet is a possible response to it. * [[sockchat:s2c:authz-success|S2C Packet 1.y: Authorization Success]] - Alternate universe version of this packet where the credentials were correct.