Class AuthCoreProvider
java.lang.Object
pro.gravit.launchserver.auth.core.AuthCoreProvider
- All Implemented Interfaces:
AutoCloseable,Reconfigurable
- Direct Known Subclasses:
AbstractSQLCoreProvider,MemoryAuthCoreProvider,MergeAuthCoreProvider,RejectAuthCoreProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuthProviderPairstatic final pro.gravit.utils.ProviderMap<AuthCoreProvider> protected LaunchServer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract AuthManager.AuthReportauthorize(String login, AuthResponse.AuthContext context, pro.gravit.launcher.base.request.auth.AuthRequest.AuthPasswordInterface password, boolean minecraftAccess) authorize(User user, AuthResponse.AuthContext context, pro.gravit.launcher.base.request.auth.AuthRequest.AuthPasswordInterface password, boolean minecraftAccess) abstract UsercheckServer(Client client, String username, String serverID) abstract voidclose()Gets a list of commands available for this object.List<pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent.AuthAvailabilityDetails> getDetails(Client client) getUserByLogin(String login) abstract UsergetUserByUsername(String username) abstract UsergetUserByUUID(UUID uuid) abstract UserSessiongetUserSessionByOAuthAccessToken(String accessToken) voidinit(LaunchServer server, AuthProviderPair pair) <T> Tabstract booleanabstract AuthManager.AuthReportrefreshAccessToken(String refreshToken, AuthResponse.AuthContext context) static voidvoidverifyAuth(AuthResponse.AuthContext context) 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
-
server
-
pair
-
-
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
-
authorize
public abstract AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext context, pro.gravit.launcher.base.request.auth.AuthRequest.AuthPasswordInterface password, boolean minecraftAccess) throws IOException - Throws:
IOException
-
authorize
public AuthManager.AuthReport authorize(User user, AuthResponse.AuthContext context, pro.gravit.launcher.base.request.auth.AuthRequest.AuthPasswordInterface password, boolean minecraftAccess) throws IOException - Throws:
IOException
-
init
-
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
public abstract User checkServer(Client client, String username, String serverID) throws IOException - Throws:
IOException
-
joinServer
public abstract boolean joinServer(Client client, String username, UUID uuid, String accessToken, String serverID) throws IOException - Throws:
IOException
-
isSupport
-
close
public abstract void close()- Specified by:
closein interfaceAutoCloseable
-