package emu.grasscutter.auth; import emu.grasscutter.auth.DefaultAuthenticators.*; import emu.grasscutter.server.http.objects.ComboTokenResJson; import emu.grasscutter.server.http.objects.LoginResultJson; /** * The default Grasscutter authentication implementation. * Allows all users to access any account. */ public final class DefaultAuthentication implements AuthenticationSystem { private final Authenticator passwordAuthenticator = new PasswordAuthenticator(); private final Authenticator tokenAuthenticator = new TokenAuthenticator(); private final Authenticator sessionKeyAuthenticator = new SessionKeyAuthenticator(); @Override public void createAccount(String username, String password) { // Unhandled. The default authenticator doesn't store passwords. } @Override public void resetPassword(String username) { // Unhandled. The default authenticator doesn't store passwords. } @Override public Authenticator getPasswordAuthenticator() { return this.passwordAuthenticator; } @Override public Authenticator getTokenAuthenticator() { return this.tokenAuthenticator; } @Override public Authenticator getSessionKeyAuthenticator() { return this.sessionKeyAuthenticator; } }