-
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.
* ADD check for the response from sending the authorization response during the standard presentation flow is a jwt token * ADD test * ADD test * ADD WebClient bean and MODIFY post request authorization Response * Exclude config tests temporarily * Include webClientConfig test * Include webClientConfig test * Review * Update project name --------- Co-authored-by: Oriol Canadés <oriol.canades@in2.es>
- Loading branch information
1 parent
9017978
commit 67f614b
Showing
9 changed files
with
287 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
rootProject.name = 'wallet-server' | ||
rootProject.name = 'wallet-api' |
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
31 changes: 31 additions & 0 deletions
31
src/main/java/es/in2/wallet/infrastructure/core/config/WebClientConfig.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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package es.in2.wallet.infrastructure.core.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.http.client.reactive.ReactorClientHttpConnector; | ||
import org.springframework.web.reactive.function.client.WebClient; | ||
import reactor.netty.http.client.HttpClient; | ||
import reactor.netty.resources.ConnectionProvider; | ||
|
||
import java.time.Duration; | ||
|
||
@Configuration | ||
public class WebClientConfig { | ||
|
||
private static final ConnectionProvider connectionProvider = ConnectionProvider.builder("custom") | ||
.maxConnections(500) | ||
.maxIdleTime(Duration.ofSeconds(50)) | ||
.maxLifeTime(Duration.ofSeconds(300)) | ||
.evictInBackground(Duration.ofSeconds(80)) | ||
.build(); | ||
|
||
@Bean | ||
public WebClient centralizedWebClient() { | ||
return WebClient.builder() | ||
.clientConnector(new ReactorClientHttpConnector( | ||
HttpClient.create(connectionProvider).followRedirect(false)) | ||
) | ||
.build(); | ||
} | ||
|
||
} |
Oops, something went wrong.