[Authentication]
#2
Authentication is described in the protocol wiki:
http://wiki.vg/Authentication#Server_operation

As for MCServer, it does exactly as written there. It receives the 0x02 handshake packet (cSocketThreads does the actual receiving, it sends data through cClientHandle into cProtocolRecognizer, that one recognizes the protocol and sends the packet into cProtocol142, which decodes the packet's meaning and calls cClientHandle's HandleHandshake and then HandleLogin (for historical reasons; earlier protocols had separate Login packets which triggerred the auth mechanism)). The HandleLogin function queues an auth-checking request with cAuthenticator.
The cAuthenticator is probably the object that you want to see the most. It runs a separate thread that processes each auth-checking request asynchronously. For each incoming request, it calls AuthFromAddress(), which connects to the auth server, sends the request and receives the answer using HTTP. If it receives a redirect request, it reconnects to the new URL and re-tries.
If successful, it sends an "auth ok" signal to the cClientHandle, through cRoot's AuthenticateUser. If not successfull, it kicks the user.

Is that good enough an explanation? Smile
Reply
Thanks given by: SashaSansay


Messages In This Thread
[Authentication] - by SashaSansay - 11-21-2012, 10:00 PM
RE: [Authentication] - by xoft - 11-21-2012, 10:59 PM
RE: [Authentication] - by SashaSansay - 11-21-2012, 11:05 PM
RE: [Authentication] - by SashaSansay - 11-22-2012, 06:49 AM
RE: [Authentication] - by FakeTruth - 11-22-2012, 11:09 AM
RE: [Authentication] - by SashaSansay - 11-22-2012, 05:06 PM
RE: [Authentication] - by FakeTruth - 11-22-2012, 10:44 PM
RE: [Authentication] - by SashaSansay - 11-22-2012, 11:14 PM
RE: [Authentication] - by FakeTruth - 11-23-2012, 01:39 AM
RE: [Authentication] - by SashaSansay - 11-23-2012, 02:02 AM
RE: [Authentication] - by FakeTruth - 11-23-2012, 02:07 AM
RE: [Authentication] - by SashaSansay - 11-23-2012, 02:57 AM
RE: [Authentication] - by xoft - 11-23-2012, 06:13 AM
RE: [Authentication] - by SashaSansay - 11-24-2012, 06:00 PM
RE: [Authentication] - by NiLSPACE - 01-18-2013, 05:25 AM
RE: [Authentication] - by Luksor - 01-18-2013, 08:49 PM
RE: [Authentication] - by xoft - 01-19-2013, 04:20 AM



Users browsing this thread: 4 Guest(s)