Cuberite
A lightweight, fast and extensible game server for Minecraft
Classes | Macros | Functions | Variables
MojangAPI.cpp File Reference
#include "Globals.h"
#include "MojangAPI.h"
#include "SQLiteCpp/Database.h"
#include "SQLiteCpp/Statement.h"
#include "../IniFile.h"
#include "json/json.h"
#include "../mbedTLS++/BlockingSslClientSocket.h"
#include "../mbedTLS++/SslConfig.h"
#include "../RankManager.h"
#include "../OSSupport/IsThread.h"
#include "../Root.h"
Include dependency graph for MojangAPI.cpp:

Go to the source code of this file.

Classes

class  cMojangAPI::cUpdateThread
 

Macros

#define DEFAULT_NAME_TO_UUID_ADDRESS   "/profiles/minecraft"
 
#define DEFAULT_NAME_TO_UUID_SERVER   "api.mojang.com"
 
#define DEFAULT_UUID_TO_PROFILE_ADDRESS   "/session/minecraft/profile/%UUID%?unsigned=false"
 
#define DEFAULT_UUID_TO_PROFILE_SERVER   "sessionserver.mojang.com"
 

Functions

static cX509CertPtr GetCACerts (void)
 Returns the CA certificates that should be trusted for Mojang-related connections. More...
 
static std::shared_ptr< const cSslConfigGetSslConfig ()
 Returns the config to be used for secure requests. More...
 

Variables

const Int64 MAX_AGE = 7 * 24 * 60 * 60
 The maximum age for items to be kept in the cache. More...
 
const int MAX_PER_QUERY = 100
 The maximum number of names to send in a single query. More...
 

Macro Definition Documentation

#define DEFAULT_NAME_TO_UUID_ADDRESS   "/profiles/minecraft"

Definition at line 33 of file MojangAPI.cpp.

#define DEFAULT_NAME_TO_UUID_SERVER   "api.mojang.com"

Definition at line 32 of file MojangAPI.cpp.

#define DEFAULT_UUID_TO_PROFILE_ADDRESS   "/session/minecraft/profile/%UUID%?unsigned=false"

Definition at line 35 of file MojangAPI.cpp.

#define DEFAULT_UUID_TO_PROFILE_SERVER   "sessionserver.mojang.com"

Definition at line 34 of file MojangAPI.cpp.

Function Documentation

static cX509CertPtr GetCACerts ( void  )
static

Returns the CA certificates that should be trusted for Mojang-related connections.

Definition at line 42 of file MojangAPI.cpp.

static std::shared_ptr<const cSslConfig> GetSslConfig ( )
static

Returns the config to be used for secure requests.

Definition at line 160 of file MojangAPI.cpp.

Variable Documentation

const Int64 MAX_AGE = 7 * 24 * 60 * 60

The maximum age for items to be kept in the cache.

Any item older than this will be removed.

Definition at line 23 of file MojangAPI.cpp.

const int MAX_PER_QUERY = 100

The maximum number of names to send in a single query.

Definition at line 26 of file MojangAPI.cpp.