diff options
author | Mattes D <github@xoft.cz> | 2014-08-01 22:35:12 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-08-01 22:35:12 +0200 |
commit | 941a182d8a8a210bb6400cc6b2750a06b5f6c038 (patch) | |
tree | 82dfee0f38536020345a820c84ff2c4f01c3213b /src/Protocol/Authenticator.h | |
parent | Merge pull request #1273 from Howaner/GlobalFixes (diff) | |
parent | Merged branch 'master' into NameToUUID. (diff) | |
download | cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar.gz cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar.bz2 cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar.lz cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar.xz cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar.zst cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Authenticator.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/Protocol/Authenticator.h b/src/Protocol/Authenticator.h index 244d94c0b..853eff535 100644 --- a/src/Protocol/Authenticator.h +++ b/src/Protocol/Authenticator.h @@ -11,8 +11,6 @@ #pragma once -#ifndef CAUTHENTICATOR_H_INCLUDED -#define CAUTHENTICATOR_H_INCLUDED #include "../OSSupport/IsThread.h" @@ -52,7 +50,7 @@ public: /** Stops the authenticator thread. The thread may be started and stopped repeatedly */ void Stop(void); - + private: class cUser @@ -76,29 +74,26 @@ private: cUserList m_Queue; cEvent m_QueueNonempty; + /** The server that is to be contacted for auth / UUID conversions */ AString m_Server; + + /** The URL to use for auth, without server part. + %USERNAME% will be replaced with actual user name. + %SERVERID% will be replaced with server's ID. + For example "/session/minecraft/hasJoined?username=%USERNAME%&serverId=%SERVERID%". */ AString m_Address; + AString m_PropertiesAddress; bool m_ShouldAuthenticate; /** cIsThread override: */ virtual void Execute(void) override; - /** Connects to a hostname using SSL, sends given data, and sets the response, returning whether all was successful or not */ - bool SecureGetFromAddress(const AString & a_CACerts, const AString & a_ExpectedPeerName, const AString & a_Request, AString & a_Response); - /** Returns true if the user authenticated okay, false on error - Sets the username, UUID, and properties (i.e. skin) fields - */ + Returns the case-corrected username, UUID, and properties (eg. skin). */ bool AuthWithYggdrasil(AString & a_UserName, const AString & a_ServerId, AString & a_UUID, Json::Value & a_Properties); }; - -#endif // CAUTHENTICATOR_H_INCLUDED - - - - |