Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logic to allow login page to render when an idp timeout occurs
- Refactor services to use a trusting/nontrusting resttemplate that has timeout configured [#157525402] https://www.pivotaltracker.com/story/show/157525402 Signed-off-by: Bruce Ricard <bruce.ricard@gmail.com>
- Loading branch information
1 parent
8197f29
commit 9a82248
Showing
24 changed files
with
899 additions
and
785 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
7 changes: 5 additions & 2 deletions
7
server/src/main/java/org/cloudfoundry/identity/uaa/impl/config/RestTemplateConfig.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,20 +1,23 @@ | |||
package org.cloudfoundry.identity.uaa.impl.config; | package org.cloudfoundry.identity.uaa.impl.config; | ||
|
|
||
import org.cloudfoundry.identity.uaa.util.UaaHttpRequestUtils; | import org.cloudfoundry.identity.uaa.util.UaaHttpRequestUtils; | ||
import org.springframework.beans.factory.annotation.Value; | |||
import org.springframework.context.annotation.Bean; | import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.client.RestTemplate; | import org.springframework.web.client.RestTemplate; | ||
|
|
||
@Configuration | @Configuration | ||
public class RestTemplateConfig { | public class RestTemplateConfig { | ||
@Value("${rest.template.timeout:10000}") | |||
public int timeout; | |||
|
|
||
@Bean | @Bean | ||
public RestTemplate nonTrustingRestTemplate() { | public RestTemplate nonTrustingRestTemplate() { | ||
return new RestTemplate(UaaHttpRequestUtils.createRequestFactory(false, 30_000)); | return new RestTemplate(UaaHttpRequestUtils.createRequestFactory(false, timeout)); | ||
} | } | ||
|
|
||
@Bean | @Bean | ||
public RestTemplate trustingRestTemplate() { | public RestTemplate trustingRestTemplate() { | ||
return new RestTemplate(UaaHttpRequestUtils.createRequestFactory(true, 30_000)); | return new RestTemplate(UaaHttpRequestUtils.createRequestFactory(true, timeout)); | ||
} | } | ||
} | } |
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
28 changes: 0 additions & 28 deletions
28
server/src/main/java/org/cloudfoundry/identity/uaa/util/RestTemplateFactory.java
This file was deleted.
Oops, something went wrong.
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.