Class NullAuthHandler
java.lang.Object
pro.gravit.launchserver.auth.handler.AuthHandler
pro.gravit.launchserver.auth.handler.NullAuthHandler
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Fields inherited from class pro.gravit.launchserver.auth.handler.AuthHandler
providers, srv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauth(AuthProviderResult authResult)Returns the UUID associated with the accountcheckServer(String username, String serverID)Validates serverIDvoidclose()booleanjoinServer(String username, String accessToken, String serverID)Checks assessToken for validity and saves serverID if successfulvoidsetBackend(AuthHandler handler)usernameToUUID(String username)uuidToUsername(UUID uuid)Methods inherited from class pro.gravit.launchserver.auth.handler.AuthHandler
authError, init, registerHandlers
-
Constructor Details
-
NullAuthHandler
public NullAuthHandler()
-
-
Method Details
-
auth
Description copied from class:AuthHandlerReturns the UUID associated with the account- Specified by:
authin classAuthHandler- Parameters:
authResult-AuthProviderresult- Returns:
- User UUID
- Throws:
IOException- Internal Script Error
-
checkServer
Description copied from class:AuthHandlerValidates serverID- Specified by:
checkServerin classAuthHandler- Parameters:
username- user nameserverID- serverID to check- Returns:
- user UUID
- Throws:
IOException- Internal Script Error
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classAuthHandler- Throws:
IOException
-
joinServer
Description copied from class:AuthHandlerChecks assessToken for validity and saves serverID if successful- Specified by:
joinServerin classAuthHandler- Parameters:
username- user nameaccessToken- assessToken to checkserverID- serverID to save- Returns:
- true - allow, false - deny
- Throws:
IOException- Internal Script Error
-
setBackend
-
usernameToUUID
- Specified by:
usernameToUUIDin classAuthHandler- Throws:
IOException
-
uuidToUsername
- Specified by:
uuidToUsernamein classAuthHandler- Throws:
IOException
-