forked from loafle/openapi-generator-original
Avoid UnsupportedEncodingException by design, replacing magic string "UTF-8" with StandardCharsets.UTF_8 (#18851)
* Replace magic string "UTF-8" with StandardCharsets.UTF_8 This avoids an UnsupportedEncodingException by design. * Remove unused UnsupportedCharsetException import
This commit is contained in:
parent
dc81339ef1
commit
5adf1ff522
@ -21,9 +21,9 @@ import io.swagger.v3.parser.core.models.AuthorizationValue;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -40,11 +40,11 @@ public class AuthParser {
|
|||||||
for (String part : parts) {
|
for (String part : parts) {
|
||||||
String[] kvPair = part.split(":");
|
String[] kvPair = part.split(":");
|
||||||
if (kvPair.length == 2) {
|
if (kvPair.length == 2) {
|
||||||
try {
|
auths.add(new AuthorizationValue(
|
||||||
auths.add(new AuthorizationValue(URLDecoder.decode(kvPair[0], "UTF-8"), URLDecoder.decode(kvPair[1], "UTF-8"), "header"));
|
URLDecoder.decode(kvPair[0], StandardCharsets.UTF_8),
|
||||||
} catch (UnsupportedEncodingException e) {
|
URLDecoder.decode(kvPair[1], StandardCharsets.UTF_8),
|
||||||
LOGGER.warn(e.getMessage());
|
"header"
|
||||||
}
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -55,17 +55,11 @@ public class AuthParser {
|
|||||||
if (authorizationValueList != null) {
|
if (authorizationValueList != null) {
|
||||||
StringBuilder b = new StringBuilder();
|
StringBuilder b = new StringBuilder();
|
||||||
for (AuthorizationValue v : authorizationValueList) {
|
for (AuthorizationValue v : authorizationValueList) {
|
||||||
try {
|
if (b.toString().length() > 0) {
|
||||||
if (b.toString().length() > 0) {
|
b.append(",");
|
||||||
b.append(",");
|
|
||||||
}
|
|
||||||
b.append(URLEncoder.encode(v.getKeyName(), "UTF-8"))
|
|
||||||
.append(":")
|
|
||||||
.append(URLEncoder.encode(v.getValue(), "UTF-8"));
|
|
||||||
} catch (Exception e) {
|
|
||||||
// continue
|
|
||||||
LOGGER.error(e.getMessage(), e);
|
|
||||||
}
|
}
|
||||||
|
b.append(URLEncoder.encode(v.getKeyName(), StandardCharsets.UTF_8))
|
||||||
|
.append(":").append(URLEncoder.encode(v.getValue(), StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
return b.toString();
|
return b.toString();
|
||||||
} else {
|
} else {
|
||||||
|
@ -17,42 +17,35 @@
|
|||||||
|
|
||||||
package org.openapitools.codegen.languages;
|
package org.openapitools.codegen.languages;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import com.fasterxml.jackson.core.JsonPointer;
|
||||||
import java.io.File;
|
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
|
||||||
import java.io.IOException;
|
import com.mifmif.common.regex.Generex;
|
||||||
import java.io.UnsupportedEncodingException;
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.text.DateFormat;
|
|
||||||
import java.text.ParseException;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.apache.commons.text.StringEscapeUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openapitools.codegen.CliOption;
|
import org.apache.commons.text.StringEscapeUtils;
|
||||||
import org.openapitools.codegen.CodegenModel;
|
import org.openapitools.codegen.*;
|
||||||
import org.openapitools.codegen.CodegenOperation;
|
|
||||||
import org.openapitools.codegen.CodegenParameter;
|
|
||||||
import org.openapitools.codegen.CodegenProperty;
|
|
||||||
import org.openapitools.codegen.SupportingFile;
|
|
||||||
import org.openapitools.codegen.languages.features.CXFExtServerFeatures;
|
import org.openapitools.codegen.languages.features.CXFExtServerFeatures;
|
||||||
import org.openapitools.codegen.model.ModelMap;
|
import org.openapitools.codegen.model.ModelMap;
|
||||||
import org.openapitools.codegen.model.ModelsMap;
|
import org.openapitools.codegen.model.ModelsMap;
|
||||||
import org.openapitools.codegen.model.OperationMap;
|
import org.openapitools.codegen.model.OperationMap;
|
||||||
import org.openapitools.codegen.model.OperationsMap;
|
import org.openapitools.codegen.model.OperationsMap;
|
||||||
import org.openapitools.codegen.utils.JsonCache;
|
import org.openapitools.codegen.utils.JsonCache;
|
||||||
import org.openapitools.codegen.utils.ModelUtils;
|
|
||||||
import org.openapitools.codegen.utils.JsonCache.CacheException;
|
import org.openapitools.codegen.utils.JsonCache.CacheException;
|
||||||
import org.openapitools.codegen.utils.JsonCache.Root.MergePolicy;
|
import org.openapitools.codegen.utils.JsonCache.Root.MergePolicy;
|
||||||
|
import org.openapitools.codegen.utils.ModelUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonPointer;
|
import java.io.ByteArrayOutputStream;
|
||||||
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
|
import java.io.File;
|
||||||
import com.mifmif.common.regex.Generex;
|
import java.io.IOException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import io.swagger.v3.oas.models.media.Schema;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An Apache CXF-based JAX-RS server with extended capabilities.
|
* An Apache CXF-based JAX-RS server with extended capabilities.
|
||||||
@ -1289,11 +1282,11 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
if (testDataCache.root().isDirty()) {
|
if (testDataCache.root().isDirty()) {
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
testDataCache.root().flush(out);
|
testDataCache.root().flush(out);
|
||||||
String testDataJson = out.toString("UTF-8");
|
String testDataJson = out.toString(StandardCharsets.UTF_8);
|
||||||
objs.put("test-data.json", testDataJson);
|
objs.put("test-data.json", testDataJson);
|
||||||
supportingFiles.add(new SupportingFile("testData.mustache", testDataFile.getAbsolutePath()));
|
supportingFiles.add(new SupportingFile("testData.mustache", testDataFile.getAbsolutePath()));
|
||||||
}
|
}
|
||||||
} catch (CacheException | UnsupportedEncodingException e) {
|
} catch (CacheException e) {
|
||||||
LOGGER.error("Error writing JSON test data file " + testDataFile, e);
|
LOGGER.error("Error writing JSON test data file " + testDataFile, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1301,12 +1294,12 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
|
|||||||
if (testDataControlCache.root().isDirty()) {
|
if (testDataControlCache.root().isDirty()) {
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
testDataControlCache.root().flush(out);
|
testDataControlCache.root().flush(out);
|
||||||
String testDataControlJson = out.toString("UTF-8");
|
String testDataControlJson = out.toString(StandardCharsets.UTF_8);
|
||||||
objs.put("test-data-control.json", testDataControlJson);
|
objs.put("test-data-control.json", testDataControlJson);
|
||||||
supportingFiles
|
supportingFiles
|
||||||
.add(new SupportingFile("testDataControl.mustache", testDataControlFile.getAbsolutePath()));
|
.add(new SupportingFile("testDataControl.mustache", testDataControlFile.getAbsolutePath()));
|
||||||
}
|
}
|
||||||
} catch (CacheException | UnsupportedEncodingException e) {
|
} catch (CacheException e) {
|
||||||
LOGGER.error("Error writing JSON test data control file " + testDataControlFile, e);
|
LOGGER.error("Error writing JSON test data control file " + testDataControlFile, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,13 +19,9 @@ package org.openapitools.codegen.languages;
|
|||||||
import io.swagger.v3.oas.models.Operation;
|
import io.swagger.v3.oas.models.Operation;
|
||||||
import io.swagger.v3.oas.models.servers.Server;
|
import io.swagger.v3.oas.models.servers.Server;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.apache.commons.text.StringEscapeUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openapitools.codegen.CodegenType;
|
import org.apache.commons.text.StringEscapeUtils;
|
||||||
import org.openapitools.codegen.CodegenOperation;
|
import org.openapitools.codegen.*;
|
||||||
import org.openapitools.codegen.CliOption;
|
|
||||||
import org.openapitools.codegen.CodegenConstants;
|
|
||||||
import org.openapitools.codegen.SupportingFile;
|
|
||||||
import org.openapitools.codegen.meta.GeneratorMetadata;
|
import org.openapitools.codegen.meta.GeneratorMetadata;
|
||||||
import org.openapitools.codegen.meta.Stability;
|
import org.openapitools.codegen.meta.Stability;
|
||||||
import org.openapitools.codegen.meta.features.*;
|
import org.openapitools.codegen.meta.features.*;
|
||||||
@ -37,9 +33,11 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.*;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.EnumSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
||||||
|
|
||||||
@ -349,23 +347,17 @@ public class PhpSlim4ServerCodegen extends AbstractPhpCodegen {
|
|||||||
// from AbstractPhpCodegen.java
|
// from AbstractPhpCodegen.java
|
||||||
// Trim the string to avoid leading and trailing spaces.
|
// Trim the string to avoid leading and trailing spaces.
|
||||||
input = input.trim();
|
input = input.trim();
|
||||||
try {
|
|
||||||
|
|
||||||
input = URLEncoder.encode(input, "UTF-8")
|
return URLEncoder.encode(input, StandardCharsets.UTF_8)
|
||||||
.replaceAll("\\+", "%20")
|
.replaceAll("\\+", "%20")
|
||||||
.replaceAll("\\%2F", "/")
|
.replaceAll("\\%2F", "/")
|
||||||
.replaceAll("\\%7B", "{") // keep { part of complex placeholders
|
.replaceAll("\\%7B", "{") // keep { part of complex placeholders
|
||||||
.replaceAll("\\%7D", "}") // } part
|
.replaceAll("\\%7D", "}") // } part
|
||||||
.replaceAll("\\%5B", "[") // [ part
|
.replaceAll("\\%5B", "[") // [ part
|
||||||
.replaceAll("\\%5D", "]") // ] part
|
.replaceAll("\\%5D", "]") // ] part
|
||||||
.replaceAll("\\%3A", ":") // : part
|
.replaceAll("\\%3A", ":") // : part
|
||||||
.replaceAll("\\%2B", "+") // + part
|
.replaceAll("\\%2B", "+") // + part
|
||||||
.replaceAll("\\%5C\\%5Cd", "\\\\d"); // \d part
|
.replaceAll("\\%5C\\%5Cd", "\\\\d"); // \d part
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
// continue
|
|
||||||
LOGGER.error(e.getMessage(), e);
|
|
||||||
}
|
|
||||||
return input;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -45,10 +45,10 @@ import org.openapitools.codegen.model.ModelsMap;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
@ -395,11 +395,7 @@ public class ModelUtils {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
ref = URLDecoder.decode(ref, StandardCharsets.UTF_8);
|
||||||
ref = URLDecoder.decode(ref, "UTF-8");
|
|
||||||
} catch (UnsupportedEncodingException ignored) {
|
|
||||||
once(LOGGER).warn("Found UnsupportedEncodingException: {}", ref);
|
|
||||||
}
|
|
||||||
|
|
||||||
// see https://tools.ietf.org/html/rfc6901#section-3
|
// see https://tools.ietf.org/html/rfc6901#section-3
|
||||||
// Because the characters '~' (%x7E) and '/' (%x2F) have special meanings in
|
// Because the characters '~' (%x7E) and '/' (%x2F) have special meanings in
|
||||||
|
@ -11,8 +11,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -43,7 +43,6 @@ import java.io.BufferedReader;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package {{invokerPackage}}.auth;
|
package {{invokerPackage}}.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package {{invokerPackage}}.auth;
|
package {{invokerPackage}}.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ import java.io.*;
|
|||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLClassLoader;
|
import java.net.URLClassLoader;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@ -51,12 +52,7 @@ public class KotlinTestUtils {
|
|||||||
CompilerConfiguration configuration = new CompilerConfiguration();
|
CompilerConfiguration configuration = new CompilerConfiguration();
|
||||||
configuration.put(CommonConfigurationKeys.MODULE_NAME, moduleName);
|
configuration.put(CommonConfigurationKeys.MODULE_NAME, moduleName);
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
PrintStream ps = null;
|
PrintStream ps = new PrintStream(baos, true, StandardCharsets.UTF_8);
|
||||||
try {
|
|
||||||
ps = new PrintStream(baos, true, "UTF-8");
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
configuration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, new PrintingMessageCollector(ps, MessageRenderer.PLAIN_FULL_PATHS, true));
|
configuration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, new PrintingMessageCollector(ps, MessageRenderer.PLAIN_FULL_PATHS, true));
|
||||||
configuration.put(JVMConfigurationKeys.OUTPUT_DIRECTORY, saveClassesDir);
|
configuration.put(JVMConfigurationKeys.OUTPUT_DIRECTORY, saveClassesDir);
|
||||||
// configuration.put(JVMConfigurationKeys.RETAIN_OUTPUT_IN_MEMORY, true)
|
// configuration.put(JVMConfigurationKeys.RETAIN_OUTPUT_IN_MEMORY, true)
|
||||||
|
@ -32,7 +32,6 @@ import org.testng.annotations.Test;
|
|||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@ -205,7 +204,7 @@ public class JsonCacheTest {
|
|||||||
private JsonCache.Root root;
|
private JsonCache.Root root;
|
||||||
private JsonCache cache;
|
private JsonCache cache;
|
||||||
|
|
||||||
private void reload() throws CacheException, UnsupportedEncodingException {
|
private void reload() throws CacheException {
|
||||||
root.unload();
|
root.unload();
|
||||||
root.load(new ByteArrayInputStream(JSON.getBytes(StandardCharsets.UTF_8)));
|
root.load(new ByteArrayInputStream(JSON.getBytes(StandardCharsets.UTF_8)));
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -41,7 +41,6 @@ import java.io.BufferedReader;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -22,8 +22,6 @@ import java.net.URI;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class HttpBasicAuth implements Authentication {
|
public class HttpBasicAuth implements Authentication {
|
||||||
private String username;
|
private String username;
|
||||||
private String password;
|
private String password;
|
||||||
|
@ -41,7 +41,6 @@ import java.io.BufferedReader;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ import java.io.BufferedReader;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ import java.io.BufferedReader;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ import java.io.BufferedReader;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package org.openapitools.client.auth;
|
package org.openapitools.client.auth;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user