class LinkSettingsUtils {

  public static Optional<IlpOverHttpLinkSettings.AuthType> getIncomingAuthType(Map<String, Object> customSettings) {
    return Optional.ofNullable(flattenSettings(customSettings).get(IncomingLinkSettings.HTTP_INCOMING_AUTH_TYPE))
        .map(Object::toString)
        .map(String::toUpperCase)
        .map(IlpOverHttpLinkSettings.AuthType::valueOf);
  }

}