mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] MemoryAuthCoreProvider
This commit is contained in:
parent
c7cb512710
commit
2d0957f834
2 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ public void init(LaunchServer server) {
|
||||||
if(authorizeUrl == null) {
|
if(authorizeUrl == null) {
|
||||||
throw new IllegalArgumentException("'authorizeUrl' can't be null");
|
throw new IllegalArgumentException("'authorizeUrl' can't be null");
|
||||||
}
|
}
|
||||||
if((checkServerUrl == null && joinServerUrl == null) || updateServerIdUrl == null) {
|
if(checkServerUrl == null && joinServerUrl == null && updateServerIdUrl == null) {
|
||||||
throw new IllegalArgumentException("Please set 'checkServerUrl' and 'joinServerUrl' or 'updateServerIdUrl'");
|
throw new IllegalArgumentException("Please set 'checkServerUrl' and 'joinServerUrl' or 'updateServerIdUrl'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext c
|
||||||
memory.add(user);
|
memory.add(user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(minecraftAccess) {
|
if(!minecraftAccess) {
|
||||||
return AuthManager.AuthReport.ofOAuth(user.accessToken, null, 0, new MemoryUserSession(user));
|
return AuthManager.AuthReport.ofOAuth(user.accessToken, null, 0, new MemoryUserSession(user));
|
||||||
} else {
|
} else {
|
||||||
return AuthManager.AuthReport.ofOAuthWithMinecraft(user.accessToken, user.accessToken, null, 0, new MemoryUserSession(user));
|
return AuthManager.AuthReport.ofOAuthWithMinecraft(user.accessToken, user.accessToken, null, 0, new MemoryUserSession(user));
|
||||||
|
|
Loading…
Reference in a new issue