mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 20:53:40 -04:00
Heartbeat should link to AuthService directly instead of having a copy of the salt
This commit is contained in:
parent
012fa57346
commit
01fb28e998
@ -60,7 +60,7 @@ namespace MCGalaxy.Network
|
|||||||
"&name=" + Uri.EscapeDataString(name) +
|
"&name=" + Uri.EscapeDataString(name) +
|
||||||
"&public=" + Server.Config.Public +
|
"&public=" + Server.Config.Public +
|
||||||
"&version=7" +
|
"&version=7" +
|
||||||
"&salt=" + Salt +
|
"&salt=" + Auth.Salt +
|
||||||
"&users=" + PlayerInfo.NonHiddenUniqueIPCount() +
|
"&users=" + PlayerInfo.NonHiddenUniqueIPCount() +
|
||||||
"&software=" + Uri.EscapeDataString(Server.SoftwareNameVersioned) +
|
"&software=" + Uri.EscapeDataString(Server.SoftwareNameVersioned) +
|
||||||
"&web=" + Server.Config.WebClient;
|
"&web=" + Server.Config.WebClient;
|
||||||
|
@ -38,8 +38,9 @@ namespace MCGalaxy.Network
|
|||||||
|
|
||||||
/// <summary> The URL this heartbeat is sent to </summary
|
/// <summary> The URL this heartbeat is sent to </summary
|
||||||
public string URL;
|
public string URL;
|
||||||
/// <summary> Salt used for verifying player names </summary>
|
/// <summary> Authentication service potentially associated with the heartbeat </summary>
|
||||||
public string Salt = "";
|
/// <example> ClassiCube beats use the Salt of the service for name authentication </example>
|
||||||
|
public AuthService Auth;
|
||||||
|
|
||||||
public string GetHost() {
|
public string GetHost() {
|
||||||
try {
|
try {
|
||||||
@ -130,7 +131,7 @@ namespace MCGalaxy.Network
|
|||||||
AuthService service = AuthService.GetOrCreate(url);
|
AuthService service = AuthService.GetOrCreate(url);
|
||||||
|
|
||||||
Heartbeat beat = new ClassiCubeBeat() { URL = url };
|
Heartbeat beat = new ClassiCubeBeat() { URL = url };
|
||||||
beat.Salt = service.Salt; // TODO: Just reference Service instead of copying salt?
|
beat.Auth = service;
|
||||||
Register(beat);
|
Register(beat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user