mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-12 08:41:00 -05:00
Update for MCAuthLib changes.
This commit is contained in:
parent
701fa0d7b0
commit
706ba62990
4 changed files with 9 additions and 4 deletions
2
pom.xml
2
pom.xml
|
@ -68,7 +68,7 @@
|
|||
<dependency>
|
||||
<groupId>com.github.steveice10</groupId>
|
||||
<artifactId>mcauthlib</artifactId>
|
||||
<version>401c99c722</version>
|
||||
<version>1058d78fd5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -56,7 +56,9 @@ public class ClientListener extends SessionAdapter {
|
|||
throw new IllegalStateException("Failed to generate shared key.", e);
|
||||
}
|
||||
|
||||
SessionService sessionService = new SessionService(event.getSession().getFlag(MinecraftConstants.AUTH_PROXY_KEY, Proxy.NO_PROXY));
|
||||
SessionService sessionService = new SessionService();
|
||||
sessionService.setProxy(event.getSession().getFlag(MinecraftConstants.AUTH_PROXY_KEY, Proxy.NO_PROXY));
|
||||
|
||||
GameProfile profile = event.getSession().getFlag(MinecraftConstants.PROFILE_KEY);
|
||||
String serverId = sessionService.getServerId(packet.getServerId(), packet.getPublicKey(), key);
|
||||
String accessToken = event.getSession().getFlag(MinecraftConstants.ACCESS_TOKEN_KEY);
|
||||
|
|
|
@ -228,7 +228,8 @@ public class MinecraftProtocol extends PacketProtocol {
|
|||
private MinecraftProtocol(String username, String clientToken, String using, boolean token, Proxy authProxy) throws RequestException {
|
||||
this(SubProtocol.LOGIN);
|
||||
|
||||
AuthenticationService auth = new AuthenticationService(clientToken, authProxy);
|
||||
AuthenticationService auth = new AuthenticationService(clientToken);
|
||||
auth.setProxy(authProxy);
|
||||
auth.setUsername(username);
|
||||
if(token) {
|
||||
auth.setAccessToken(using);
|
||||
|
|
|
@ -190,7 +190,9 @@ public class ServerListener extends SessionAdapter {
|
|||
public void run() {
|
||||
GameProfile profile = null;
|
||||
if(this.key != null) {
|
||||
SessionService sessionService = new SessionService(this.session.getFlag(MinecraftConstants.AUTH_PROXY_KEY, Proxy.NO_PROXY));
|
||||
SessionService sessionService = new SessionService();
|
||||
sessionService.setProxy(this.session.getFlag(MinecraftConstants.AUTH_PROXY_KEY, Proxy.NO_PROXY));
|
||||
|
||||
try {
|
||||
profile = sessionService.getProfileByServer(username, sessionService.getServerId(SERVER_ID, KEY_PAIR.getPublic(), this.key));
|
||||
} catch(RequestException e) {
|
||||
|
|
Loading…
Reference in a new issue