@Test void testGetOidcClients() { Entity entity = mock(Entity.class); OidcClient oidcClient = mock(OidcClient.class); when(entity.getEntities("oidcClients", OidcClient.class)).thenReturn(singletonList(oidcClient)); when(entity.getBoolean("signup")).thenReturn(true); when(dataService.findOneById("sys_set_auth", "auth")).thenReturn(entity); assertEquals( singletonList(oidcClient), newArrayList(authenticationSettingsImpl.getOidcClients())); }
@Override public Iterable<OidcClient> getOidcClients() { boolean enableOidc = getSignUp() && !getSignUpModeration(); return enableOidc ? getEntities(Meta.OIDC_CLIENTS, OidcClient.class) : emptyList(); }
AuthenticationSettingsImpl extends DefaultSettingsEntity implements AuthenticationSettings { @Override public Iterable<OidcClient> getOidcClients() { boolean enableOidc = getSignUp() && !getSignUpModeration(); return enableOidc ? getEntities(Meta.OIDC_CLIENTS, OidcClient.class) : emptyList(); } }
AuthenticationSettingsImpl extends DefaultSettingsEntity implements AuthenticationSettings { @Override public Iterable<OidcClient> getOidcClients() { boolean enableOidc = getSignUp() && !getSignUpModeration(); return enableOidc ? getEntities(Meta.OIDC_CLIENTS, OidcClient.class) : emptyList(); } AuthenticationSettingsImpl(); }
AuthenticationSettingsImpl extends DefaultSettingsEntity implements AuthenticationSettings { @Override public Iterable<OidcClient> getOidcClients() { boolean enableOidc = getSignUp() && !getSignUpModeration(); return enableOidc ? getEntities(Meta.OIDC_CLIENTS, OidcClient.class) : emptyList(); } AuthenticationSettingsImpl(); @Override boolean getSignUp(); @Override void setSignUp(boolean signUp); @Override boolean getSignUpModeration(); @Override void setOidcClients(List<OidcClient> oidcClients); @Override Iterable<OidcClient> getOidcClients(); @Override void setSignUpModeration(boolean signUpModeration); @Override void setTwoFactorAuthentication(TwoFactorAuthenticationSetting twoFactorAuthentication); @Override TwoFactorAuthenticationSetting getTwoFactorAuthentication(); }
AuthenticationSettingsImpl extends DefaultSettingsEntity implements AuthenticationSettings { @Override public Iterable<OidcClient> getOidcClients() { boolean enableOidc = getSignUp() && !getSignUpModeration(); return enableOidc ? getEntities(Meta.OIDC_CLIENTS, OidcClient.class) : emptyList(); } AuthenticationSettingsImpl(); @Override boolean getSignUp(); @Override void setSignUp(boolean signUp); @Override boolean getSignUpModeration(); @Override void setOidcClients(List<OidcClient> oidcClients); @Override Iterable<OidcClient> getOidcClients(); @Override void setSignUpModeration(boolean signUpModeration); @Override void setTwoFactorAuthentication(TwoFactorAuthenticationSetting twoFactorAuthentication); @Override TwoFactorAuthenticationSetting getTwoFactorAuthentication();  }