diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..079dc0d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files +- repo: https://github.com/networknt/pre-commit-hook-keyword + rev: f17c4de14fc24420f6768c19cad06ba03af06d86 + hooks: + - id: keywordscan + args: ["--keywords=c3VubGlmZQ==,Y2liYw==,c3VuIGxpZmU="] + types: ["text"] diff --git a/README.md b/README.md index 442265c..c5c8e30 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ An HTTP client based on JDK 11 http-client to invoke APIs with client-side cross The purpose of the client module is trying to help the user to handler SSL cert load and JWT token process. -### Synchronous call +### Synchronous call ```text HttpClientRequest httpClientRequest = new HttpClientRequest(); @@ -56,7 +56,7 @@ The purpose of the client module is trying to help the user to handler SSL cert ### Connectionpool -JDK 11 http connection build connection pool internal and it will select the connection from pool base on certain logic. +JDK 11 http connection build connection pool internal and it will select the connection from pool base on certain logic. ### Connection with proxy. @@ -115,7 +115,7 @@ Java HttpClient by default will load default JDK cacerts for https request, if t ``` # trust store contains certifictes that server needs. Enable if tls is used. loadTrustStore: false -``` +``` If we need load self-signed trust from client truststore, set the config value to true: @@ -124,4 +124,4 @@ If we need load self-signed trust from client truststore, set the config value t loadTrustStore: true ``` -System will load the client truststore and default certs together for SSL context \ No newline at end of file +System will load the client truststore and default certs together for SSL context diff --git a/src/main/java/com/networknt/client/oauth/SignKeyRequest.java b/src/main/java/com/networknt/client/oauth/SignKeyRequest.java index 8c4abbd..1afdd08 100644 --- a/src/main/java/com/networknt/client/oauth/SignKeyRequest.java +++ b/src/main/java/com/networknt/client/oauth/SignKeyRequest.java @@ -26,7 +26,7 @@ /** * The configuration is coming from the sign/key section in the client.yml file. This request is used * to get the key for sign verification. The proxy configuration is defined in the sign section as it - * is not possible the same service using two different proxy servers. + * is not possible the same service using two different proxy servers. * * @author Steve Hu */ diff --git a/src/main/java/com/networknt/http/client/ssl/TLSConfig.java b/src/main/java/com/networknt/http/client/ssl/TLSConfig.java index 79e09ce..9603da6 100644 --- a/src/main/java/com/networknt/http/client/ssl/TLSConfig.java +++ b/src/main/java/com/networknt/http/client/ssl/TLSConfig.java @@ -18,7 +18,7 @@ /** * This class holds configuration values related to server identify check. - * + * * @author Daniel Zhao * */ @@ -34,5 +34,5 @@ private TLSConfig(boolean checkServerIdentify) { public boolean getCheckServerIdentity() { return checkServerIdentify; } - + } diff --git a/src/main/java/org/apache/hc/client5/http/ssl/copied/DistinguishedNameParser.java b/src/main/java/org/apache/hc/client5/http/ssl/copied/DistinguishedNameParser.java index ca99dd5..2c82fc4 100644 --- a/src/main/java/org/apache/hc/client5/http/ssl/copied/DistinguishedNameParser.java +++ b/src/main/java/org/apache/hc/client5/http/ssl/copied/DistinguishedNameParser.java @@ -128,4 +128,3 @@ public void copyUnquotedContent( } } -