Class AuthManager
java.lang.Object
pro.gravit.launchserver.manangers.AuthManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic classstatic final recordstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauth(AuthResponse.AuthContext context, pro.gravit.launcher.base.request.auth.AuthRequest.AuthPasswordInterface password) Full client authorization with password verificationvoidcheck(AuthResponse.AuthContext context) Validate auth params ans statecheckServer(Client client, String username, String serverID) createClientProfileKeys(UUID playerUUID) pro.gravit.launcher.base.request.auth.AuthRequest.AuthPasswordInterfacedecryptPassword(pro.gravit.launcher.base.request.auth.AuthRequest.AuthPasswordInterface password) pro.gravit.launcher.base.profiles.PlayerProfilegetPlayerProfile(AuthProviderPair pair, String username) pro.gravit.launcher.base.profiles.PlayerProfilegetPlayerProfile(AuthProviderPair pair, String username, pro.gravit.launcher.base.profiles.ClientProfile profile) pro.gravit.launcher.base.profiles.PlayerProfilegetPlayerProfile(AuthProviderPair pair, UUID uuid) pro.gravit.launcher.base.profiles.PlayerProfilegetPlayerProfile(AuthProviderPair pair, UUID uuid, pro.gravit.launcher.base.profiles.ClientProfile profile) pro.gravit.launcher.base.profiles.PlayerProfilegetPlayerProfile(AuthProviderPair pair, User user) pro.gravit.launcher.base.profiles.PlayerProfilegetPlayerProfile(Client client) voidinternalAuth(Client client, AuthResponse.ConnectTypes authType, AuthProviderPair pair, String username, UUID uuid, pro.gravit.launcher.base.ClientPermissions permissions, boolean oauth) Writing authorization information to the Client objectbooleanmakeAuthContext(Client client, AuthResponse.ConnectTypes authType, AuthProviderPair pair, String login, String profileName, String ip) Create AuthContextnewCheckServerToken(String serverName, String authId, boolean publicOnly) parseCheckServerToken(String token)
-
Constructor Details
-
AuthManager
-
-
Method Details
-
newCheckServerToken
-
parseCheckServerToken
-
makeAuthContext
public AuthResponse.AuthContext makeAuthContext(Client client, AuthResponse.ConnectTypes authType, AuthProviderPair pair, String login, String profileName, String ip) Create AuthContext- Returns:
- AuthContext instance
-
check
Validate auth params ans state- Parameters:
context- Auth context- Throws:
AuthException- auth not possible
-
auth
public AuthManager.AuthReport auth(AuthResponse.AuthContext context, pro.gravit.launcher.base.request.auth.AuthRequest.AuthPasswordInterface password) throws AuthException Full client authorization with password verification- Parameters:
context- AuthContextpassword- User password- Returns:
- Access token
- Throws:
AuthException
-
internalAuth
public void internalAuth(Client client, AuthResponse.ConnectTypes authType, AuthProviderPair pair, String username, UUID uuid, pro.gravit.launcher.base.ClientPermissions permissions, boolean oauth) Writing authorization information to the Client object -
createClientProfileKeys
-
checkServer
public AuthManager.CheckServerReport checkServer(Client client, String username, String serverID) throws IOException - Throws:
IOException
-
joinServer
public boolean joinServer(Client client, String username, UUID uuid, String accessToken, String serverID) throws IOException - Throws:
IOException
-
getPlayerProfile
-
getPlayerProfile
public pro.gravit.launcher.base.profiles.PlayerProfile getPlayerProfile(AuthProviderPair pair, String username) -
getPlayerProfile
public pro.gravit.launcher.base.profiles.PlayerProfile getPlayerProfile(AuthProviderPair pair, String username, pro.gravit.launcher.base.profiles.ClientProfile profile) -
getPlayerProfile
public pro.gravit.launcher.base.profiles.PlayerProfile getPlayerProfile(AuthProviderPair pair, UUID uuid) -
getPlayerProfile
public pro.gravit.launcher.base.profiles.PlayerProfile getPlayerProfile(AuthProviderPair pair, UUID uuid, pro.gravit.launcher.base.profiles.ClientProfile profile) -
getPlayerProfile
public pro.gravit.launcher.base.profiles.PlayerProfile getPlayerProfile(AuthProviderPair pair, User user) -
decryptPassword
public pro.gravit.launcher.base.request.auth.AuthRequest.AuthPasswordInterface decryptPassword(pro.gravit.launcher.base.request.auth.AuthRequest.AuthPasswordInterface password) throws AuthException - Throws:
AuthException
-