Class AuthCoreProvider
java.lang.Object
pro.gravit.launchserver.auth.core.AuthCoreProvider
- All Implemented Interfaces:
AutoCloseable,Reconfigurable
- Direct Known Subclasses:
JsonCoreProvider,MySQLCoreProvider,RejectAuthCoreProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckServer(Client client, String username, String serverID) abstract voidclose()abstract AuthManager.AuthReportcreateOAuthSession(User user, AuthResponse.AuthContext context, AuthCoreProvider.PasswordVerifyReport report, boolean minecraftAccess) Gets a list of commands available for this object.List<pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent.AuthAvailabilityDetails>getDetails(Client client) getUserByLogin(String login) abstract UsergetUserByUsername(String username) abstract UsergetUserByUUID(UUID uuid) abstract UserSessiongetUserSessionByOAuthAccessToken(String accessToken) abstract voidinit(LaunchServer server) <T> TbooleanjoinServer(Client client, String username, String accessToken, String serverID) abstract AuthManager.AuthReportrefreshAccessToken(String refreshToken, AuthResponse.AuthContext context) static voidprotected abstract booleanupdateServerID(User user, String serverID) abstract voidverifyAuth(AuthResponse.AuthContext context) verifyPassword(User user, pro.gravit.launcher.request.auth.AuthRequest.AuthPasswordInterface password) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pro.gravit.launchserver.Reconfigurable
defaultCommandsMap
-
Field Details
-
providers
-
-
Constructor Details
-
AuthCoreProvider
public AuthCoreProvider()
-
-
Method Details
-
registerProviders
public static void registerProviders() -
getUserByUsername
-
getUserByLogin
-
getUserByUUID
-
getUserSessionByOAuthAccessToken
public abstract UserSession getUserSessionByOAuthAccessToken(String accessToken) throws AuthCoreProvider.OAuthAccessTokenExpired -
refreshAccessToken
public abstract AuthManager.AuthReport refreshAccessToken(String refreshToken, AuthResponse.AuthContext context) -
verifyAuth
- Throws:
AuthException
-
verifyPassword
public abstract AuthCoreProvider.PasswordVerifyReport verifyPassword(User user, pro.gravit.launcher.request.auth.AuthRequest.AuthPasswordInterface password) -
createOAuthSession
public abstract AuthManager.AuthReport createOAuthSession(User user, AuthResponse.AuthContext context, AuthCoreProvider.PasswordVerifyReport report, boolean minecraftAccess) throws IOException - Throws:
IOException
-
init
-
updateServerID
- Throws:
IOException
-
getDetails
-
getCommands
Description copied from interface:ReconfigurableGets a list of commands available for this object.- Specified by:
getCommandsin interfaceReconfigurable- Returns:
- Key - Command Name Value is a command object
-
checkServer
- Throws:
IOException
-
joinServer
public boolean joinServer(Client client, String username, String accessToken, String serverID) throws IOException - Throws:
IOException
-
isSupport
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-