This is an old revision of the document!
Table of Contents
Packet 1: Authorization Attempt
Attempts authentication with the server.
There are two supported formats. One works roughly the same as the HTTP Authorization header, the other is considered legacy and is implementation defined.
Format
Index | Type | Description |
---|---|---|
0 | 1 | Authentication Attempt packet ID |
1 | string | Authentication scheme, e.g. Bearer. |
2 | string | Authentication arguments. |
The only difference between the Authorization header is that the scheme and arguments are separated by a \t
instead of a space.
The legacy format would send index 1 and up to a private authentication verification script. Only one public implementation of this was the one for phpBB, which substitutes index 1 for the current User ID and index 2 for the Session ID cookie value.
SharpChat falls back to the legacy implementation by checking whether index 1 is numeric, in which case it is assumed to be a user id.
Examples
A client authenticating using a Bearer token:
1\tBearer\tUiTfepl9rNY0dGMpDjehMu1FR7DqsXPbtd2kis8sHKGaHXNdK2B6iG6JrpARyOqU
A client authenticating using a Flashii Misuzu token:
1\tMisuzu\tAgOr1Q7cwN5hp7szVwoC-PapvsJWajdU3_sjNLdJqqx0D1b51AF1ATEBc0BndjJLd2pvU2hHdzN5SjNzUiTfepl9rNY0dGMpDjehMu1FR7DqsXPbtd2kis8sHKGaHXNdK2B6iG6JrpARyOqU
A client authenticating using the legacy phpBB format:
1\t2\tEvFvkZgLFoG1ZShMxpxILmS744usEjmH
See Also
- Authentication Success - Informs the client that authentication completed successfully and who they are.
- Authentication Failure - Informs the client that authentication failed and why.