forked from networknt/light-4j
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes networknt#794 switch OauthHelper to HttpClient of jdk11 to supp…
…ort forward proxy (networknt#795)
- Loading branch information
Showing
22 changed files
with
386 additions
and
621 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 9 additions & 12 deletions
21
client/src/main/java/com/networknt/client/oauth/IClientRequestComposable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
package com.networknt.client.oauth; | ||
|
||
import io.undertow.client.ClientRequest; | ||
|
||
import java.net.http.HttpRequest; | ||
|
||
/** | ||
* An interface to describe that a ClientRequest can be composed by a TokenRequest. | ||
* TokenRequest info should be the same for different Oauth servers, but different Oauth servers may have different way to accept request. | ||
* An interface to describe that a HttpRequest can be composed by a TokenRequest. TokenRequest info should be the | ||
* same for different OAuth servers, but different OAuth servers may have different way to accept request. | ||
* | ||
* @author Steve Hu | ||
*/ | ||
public interface IClientRequestComposable { | ||
/** | ||
* compose an actual ClientRequest based on the given TokenRequest model. | ||
* compose an actual HttpRequest based on the given TokenRequest model. | ||
* @param tokenRequest token request | ||
* @return ClientRequest | ||
* @return HttpRequest | ||
*/ | ||
ClientRequest composeClientRequest(TokenRequest tokenRequest); | ||
HttpRequest composeClientRequest(TokenRequest tokenRequest); | ||
|
||
/** | ||
* compose an actual request body based on the given TokenRequest model. | ||
* @param tokenRequest token request | ||
* @return String | ||
*/ | ||
String composeRequestBody(TokenRequest tokenRequest); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.