@Test public void is_enabled() { settings.setProperty("sonar.auth.saml.applicationId", "MyApp"); settings.setProperty("sonar.auth.saml.providerId", "http: settings.setProperty("sonar.auth.saml.loginUrl", "http: settings.setProperty("sonar.auth.saml.certificate.secured", "ABCDEFG"); settings.setProperty("sonar.auth.saml.user.login", "login"); settings.setProperty("sonar.auth.saml.user.name", "name"); settings.setProperty("sonar.auth.saml.enabled", true); assertThat(underTest.isEnabled()).isTrue(); settings.setProperty("sonar.auth.saml.enabled", false); assertThat(underTest.isEnabled()).isFalse(); }
boolean isEnabled() { return configuration.getBoolean(ENABLED).orElse(false) && configuration.get(PROVIDER_ID).isPresent() && configuration.get(APPLICATION_ID).isPresent() && configuration.get(LOGIN_URL).isPresent() && configuration.get(CERTIFICATE).isPresent() && configuration.get(USER_LOGIN_ATTRIBUTE).isPresent() && configuration.get(USER_NAME_ATTRIBUTE).isPresent(); }
SamlSettings { boolean isEnabled() { return configuration.getBoolean(ENABLED).orElse(false) && configuration.get(PROVIDER_ID).isPresent() && configuration.get(APPLICATION_ID).isPresent() && configuration.get(LOGIN_URL).isPresent() && configuration.get(CERTIFICATE).isPresent() && configuration.get(USER_LOGIN_ATTRIBUTE).isPresent() && configuration.get(USER_NAME_ATTRIBUTE).isPresent(); } }
SamlSettings { boolean isEnabled() { return configuration.getBoolean(ENABLED).orElse(false) && configuration.get(PROVIDER_ID).isPresent() && configuration.get(APPLICATION_ID).isPresent() && configuration.get(LOGIN_URL).isPresent() && configuration.get(CERTIFICATE).isPresent() && configuration.get(USER_LOGIN_ATTRIBUTE).isPresent() && configuration.get(USER_NAME_ATTRIBUTE).isPresent(); } SamlSettings(Configuration configuration); }
SamlSettings { boolean isEnabled() { return configuration.getBoolean(ENABLED).orElse(false) && configuration.get(PROVIDER_ID).isPresent() && configuration.get(APPLICATION_ID).isPresent() && configuration.get(LOGIN_URL).isPresent() && configuration.get(CERTIFICATE).isPresent() && configuration.get(USER_LOGIN_ATTRIBUTE).isPresent() && configuration.get(USER_NAME_ATTRIBUTE).isPresent(); } SamlSettings(Configuration configuration);  }
SamlSettings { boolean isEnabled() { return configuration.getBoolean(ENABLED).orElse(false) && configuration.get(PROVIDER_ID).isPresent() && configuration.get(APPLICATION_ID).isPresent() && configuration.get(LOGIN_URL).isPresent() && configuration.get(CERTIFICATE).isPresent() && configuration.get(USER_LOGIN_ATTRIBUTE).isPresent() && configuration.get(USER_NAME_ATTRIBUTE).isPresent(); } SamlSettings(Configuration configuration);   }