mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] Обращение к AuthHandler'у
This commit is contained in:
parent
eca8cc2cbc
commit
e7fd749c2f
1 changed files with 12 additions and 6 deletions
|
@ -98,14 +98,20 @@ public void execute(ChannelHandlerContext ctx, Client clientData) throws Excepti
|
|||
}
|
||||
result.session = clientData.session;
|
||||
}
|
||||
UUID uuid = pair.handler.auth(aresult);
|
||||
result.playerProfile = ProfileByUUIDResponse.getProfile(uuid, aresult.username, client, clientData.auth.textureProvider);
|
||||
if (authType == ConnectTypes.API || !server.config.protectHandler.allowGetAccessToken(context)) {
|
||||
UUID uuid;
|
||||
if (authType == ConnectTypes.CLIENT && server.config.protectHandler.allowGetAccessToken(context)) {
|
||||
uuid = pair.handler.auth(aresult);
|
||||
if (LogHelper.isDebugEnabled()) {
|
||||
LogHelper.debug("Auth: %s accessToken %s uuid: %s", login, result.accessToken, uuid.toString());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uuid = pair.handler.usernameToUUID(aresult.username);
|
||||
result.accessToken = null;
|
||||
}
|
||||
else if (LogHelper.isDebugEnabled()) {
|
||||
LogHelper.debug("Auth: %s accessToken %s uuid: %s", login, result.accessToken, uuid.toString());
|
||||
}
|
||||
result.playerProfile = ProfileByUUIDResponse.getProfile(uuid, aresult.username, client, clientData.auth.textureProvider);
|
||||
|
||||
clientData.type = authType;
|
||||
sendResult(result);
|
||||
} catch (AuthException | HookException e) {
|
||||
|
|
Loading…
Reference in a new issue