@Test public void getOutgoingAuthTypeWithSimple() { assertThat(LinkSettingsUtils.getOutgoingAuthType(AbstractHttpLinkSettingsTest.customSettingsSimpleFlat())) .isEqualTo(Optional.of(IlpOverHttpLinkSettings.AuthType.SIMPLE)); assertThat(LinkSettingsUtils.getOutgoingAuthType(AbstractHttpLinkSettingsTest.customSettingsSimpleHierarchical())) .isEqualTo(Optional.of(IlpOverHttpLinkSettings.AuthType.SIMPLE)); }
public static Optional<IlpOverHttpLinkSettings.AuthType> getOutgoingAuthType(Map<String, Object> customSettings) { return Optional.ofNullable(flattenSettings(customSettings).get(OutgoingLinkSettings.HTTP_OUTGOING_AUTH_TYPE)) .map(Object::toString) .map(String::toUpperCase) .map(IlpOverHttpLinkSettings.AuthType::valueOf); }
LinkSettingsUtils { public static Optional<IlpOverHttpLinkSettings.AuthType> getOutgoingAuthType(Map<String, Object> customSettings) { return Optional.ofNullable(flattenSettings(customSettings).get(OutgoingLinkSettings.HTTP_OUTGOING_AUTH_TYPE)) .map(Object::toString) .map(String::toUpperCase) .map(IlpOverHttpLinkSettings.AuthType::valueOf); } }
LinkSettingsUtils { public static Optional<IlpOverHttpLinkSettings.AuthType> getOutgoingAuthType(Map<String, Object> customSettings) { return Optional.ofNullable(flattenSettings(customSettings).get(OutgoingLinkSettings.HTTP_OUTGOING_AUTH_TYPE)) .map(Object::toString) .map(String::toUpperCase) .map(IlpOverHttpLinkSettings.AuthType::valueOf); }  }
LinkSettingsUtils { public static Optional<IlpOverHttpLinkSettings.AuthType> getOutgoingAuthType(Map<String, Object> customSettings) { return Optional.ofNullable(flattenSettings(customSettings).get(OutgoingLinkSettings.HTTP_OUTGOING_AUTH_TYPE)) .map(Object::toString) .map(String::toUpperCase) .map(IlpOverHttpLinkSettings.AuthType::valueOf); }  static Map<String, Object> flattenSettings(Map<String, Object> settings); static Optional<IlpOverHttpLinkSettings.AuthType> getIncomingAuthType(Map<String, Object> customSettings); static Optional<IlpOverHttpLinkSettings.AuthType> getOutgoingAuthType(Map<String, Object> customSettings); static void validate(AuthenticatedLinkSettings linkSettings); }
LinkSettingsUtils { public static Optional<IlpOverHttpLinkSettings.AuthType> getOutgoingAuthType(Map<String, Object> customSettings) { return Optional.ofNullable(flattenSettings(customSettings).get(OutgoingLinkSettings.HTTP_OUTGOING_AUTH_TYPE)) .map(Object::toString) .map(String::toUpperCase) .map(IlpOverHttpLinkSettings.AuthType::valueOf); }  static Map<String, Object> flattenSettings(Map<String, Object> settings); static Optional<IlpOverHttpLinkSettings.AuthType> getIncomingAuthType(Map<String, Object> customSettings); static Optional<IlpOverHttpLinkSettings.AuthType> getOutgoingAuthType(Map<String, Object> customSettings); static void validate(AuthenticatedLinkSettings linkSettings);  }