Package emu.grasscutter.auth
Class DefaultAuthentication
java.lang.Object
emu.grasscutter.auth.DefaultAuthentication
- All Implemented Interfaces:
AuthenticationSystem
The default Grasscutter authentication implementation.
Allows all users to access any account.
-
Nested Class Summary
Nested classes/interfaces inherited from interface emu.grasscutter.auth.AuthenticationSystem
AuthenticationSystem.AuthenticationRequest -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateAccount(String username, String password) Called when a user requests to make an account.This is the authenticator used for handling external authentication requests.This is the authenticator used for password authentication.This is the authenticator used for session authentication.This is the authenticator used for token authentication.voidresetPassword(String username) Called when a user requests to reset their password.booleanverifyUser(String details) Called by plugins to internally verify a user's identity.
-
Constructor Details
-
DefaultAuthentication
public DefaultAuthentication()
-
-
Method Details
-
createAccount
Description copied from interface:AuthenticationSystemCalled when a user requests to make an account.- Specified by:
createAccountin interfaceAuthenticationSystem- Parameters:
username- The provided username.password- The provided password. (SHA-256'ed)
-
resetPassword
Description copied from interface:AuthenticationSystemCalled when a user requests to reset their password.- Specified by:
resetPasswordin interfaceAuthenticationSystem- Parameters:
username- The username of the account to reset.
-
verifyUser
Description copied from interface:AuthenticationSystemCalled by plugins to internally verify a user's identity.- Specified by:
verifyUserin interfaceAuthenticationSystem- Parameters:
details- A unique, one-time token to verify the user.- Returns:
- True if the user is verified, False otherwise.
-
getPasswordAuthenticator
Description copied from interface:AuthenticationSystemThis is the authenticator used for password authentication.- Specified by:
getPasswordAuthenticatorin interfaceAuthenticationSystem- Returns:
- An authenticator.
-
getTokenAuthenticator
Description copied from interface:AuthenticationSystemThis is the authenticator used for token authentication.- Specified by:
getTokenAuthenticatorin interfaceAuthenticationSystem- Returns:
- An authenticator.
-
getSessionKeyAuthenticator
Description copied from interface:AuthenticationSystemThis is the authenticator used for session authentication.- Specified by:
getSessionKeyAuthenticatorin interfaceAuthenticationSystem- Returns:
- An authenticator.
-
getExternalAuthenticator
Description copied from interface:AuthenticationSystemThis is the authenticator used for handling external authentication requests.- Specified by:
getExternalAuthenticatorin interfaceAuthenticationSystem- Returns:
- An authenticator.
-