Class PostgresSQLCoreProvider
java.lang.Object
pro.gravit.launchserver.auth.core.AuthCoreProvider
pro.gravit.launchserver.auth.core.PostgresSQLCoreProvider
- All Implemented Interfaces:
AutoCloseable,Reconfigurable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from class pro.gravit.launchserver.auth.core.AuthCoreProvider
AuthCoreProvider.OAuthAccessTokenExpired, AuthCoreProvider.PasswordVerifyReport -
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class pro.gravit.launchserver.auth.core.AuthCoreProvider
providers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthorize(String login, AuthResponse.AuthContext context, pro.gravit.launcher.request.auth.AuthRequest.AuthPasswordInterface password, boolean minecraftAccess) voidclose()getUserByLogin(String login) getUserByUsername(String username) getUserByUUID(UUID uuid) getUserSessionByOAuthAccessToken(String accessToken) voidinit(LaunchServer server) refreshAccessToken(String refreshToken, AuthResponse.AuthContext context) protected booleanupdateAuth(User user, String accessToken) protected booleanupdateServerID(User user, String serverID) Methods inherited from class pro.gravit.launchserver.auth.core.AuthCoreProvider
authorize, checkServer, getCommands, getDetails, isSupport, joinServer, registerProviders, verifyAuthMethods 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
-
postgresSQLHolder
-
uuidColumn
-
usernameColumn
-
accessTokenColumn
-
passwordColumn
-
serverIDColumn
-
table
-
passwordVerifier
-
customQueryByUUIDSQL
-
customQueryByUsernameSQL
-
customQueryByLoginSQL
-
customUpdateAuthSQL
-
customUpdateServerIdSQL
-
-
Constructor Details
-
PostgresSQLCoreProvider
public PostgresSQLCoreProvider()
-
-
Method Details
-
getUserByUsername
- Specified by:
getUserByUsernamein classAuthCoreProvider
-
getUserByUUID
- Specified by:
getUserByUUIDin classAuthCoreProvider
-
getUserByLogin
- Overrides:
getUserByLoginin classAuthCoreProvider
-
getUserSessionByOAuthAccessToken
public UserSession getUserSessionByOAuthAccessToken(String accessToken) throws AuthCoreProvider.OAuthAccessTokenExpired - Specified by:
getUserSessionByOAuthAccessTokenin classAuthCoreProvider- Throws:
AuthCoreProvider.OAuthAccessTokenExpired
-
refreshAccessToken
public AuthManager.AuthReport refreshAccessToken(String refreshToken, AuthResponse.AuthContext context) - Specified by:
refreshAccessTokenin classAuthCoreProvider
-
authorize
public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext context, pro.gravit.launcher.request.auth.AuthRequest.AuthPasswordInterface password, boolean minecraftAccess) throws IOException - Specified by:
authorizein classAuthCoreProvider- Throws:
IOException
-
init
- Specified by:
initin classAuthCoreProvider
-
updateAuth
- Throws:
IOException
-
updateServerID
- Overrides:
updateServerIDin classAuthCoreProvider- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classAuthCoreProvider- Throws:
IOException
-