External authentication

This commit is contained in:
KingRainbow44
2022-05-14 12:39:21 -04:00
parent 5d7edc389e
commit 04d9613fac
7 changed files with 85 additions and 19 deletions

View File

@@ -15,6 +15,7 @@ public final class DefaultAuthentication implements AuthenticationSystem {
private final Authenticator<LoginResultJson> passwordAuthenticator = new PasswordAuthenticator();
private final Authenticator<LoginResultJson> tokenAuthenticator = new TokenAuthenticator();
private final Authenticator<ComboTokenResJson> sessionKeyAuthenticator = new SessionKeyAuthenticator();
private final ExternalAuthenticator externalAuthenticator = new ExternalAuthentication();
@Override
public void createAccount(String username, String password) {
@@ -46,4 +47,9 @@ public final class DefaultAuthentication implements AuthenticationSystem {
public Authenticator<ComboTokenResJson> getSessionKeyAuthenticator() {
return this.sessionKeyAuthenticator;
}
@Override
public ExternalAuthenticator getExternalAuthenticator() {
return this.externalAuthenticator;
}
}