#1141 Fix review remarks by @games647
- Use SHA512 to generate keys instead of default SHA1 - Declare google authenticator dependency as optional and add relocation rule
This commit is contained in:
@@ -36,7 +36,7 @@ public class TotpAuthenticatorTest {
|
||||
|
||||
@Before
|
||||
public void initializeTotpAuthenticator() {
|
||||
totpAuthenticator = new TotpAuthenticator(googleAuthenticator, bukkitService);
|
||||
totpAuthenticator = new TotpAuthenticatorTestImpl(bukkitService);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -85,4 +85,16 @@ public class TotpAuthenticatorTest {
|
||||
assertThat(result, equalTo(false));
|
||||
verifyZeroInteractions(googleAuthenticator);
|
||||
}
|
||||
|
||||
private final class TotpAuthenticatorTestImpl extends TotpAuthenticator {
|
||||
|
||||
TotpAuthenticatorTestImpl(BukkitService bukkitService) {
|
||||
super(bukkitService);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IGoogleAuthenticator createGoogleAuthenticator() {
|
||||
return googleAuthenticator;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user