SEBSERV-219 fixed logo
This commit is contained in:
parent
ddaf02056b
commit
cb6a3c5c08
1 changed files with 17 additions and 12 deletions
|
@ -12,7 +12,9 @@ import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.RequestDispatcher;
|
import javax.servlet.RequestDispatcher;
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
|
@ -122,20 +124,20 @@ public final class InstitutionalAuthenticationEntryPoint implements Authenticati
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
final Map<String, Object> uriVars = new HashMap<>();
|
||||||
|
uriVars.put(API.INFO_PARAM_INST_SUFFIX, institutionalEndpoint);
|
||||||
|
final String uriString = this.webserviceURIService.getURIBuilder()
|
||||||
|
.path(API.INFO_ENDPOINT + API.INFO_INST_ENDPOINT)
|
||||||
|
.uriVariables(uriVars)
|
||||||
|
.toUriString();
|
||||||
final RestTemplate restTemplate = new RestTemplate();
|
final RestTemplate restTemplate = new RestTemplate();
|
||||||
final List<EntityName> institutions = restTemplate
|
final List<EntityName> institutions = restTemplate
|
||||||
.exchange(
|
.exchange(
|
||||||
this.webserviceURIService.getURIBuilder()
|
uriString,
|
||||||
.path(API.INFO_ENDPOINT + API.INFO_INST_ENDPOINT)
|
|
||||||
.toUriString(),
|
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
HttpEntity.EMPTY,
|
HttpEntity.EMPTY,
|
||||||
new ParameterizedTypeReference<List<EntityName>>() {
|
new ParameterizedTypeReference<List<EntityName>>() {
|
||||||
},
|
})
|
||||||
institutionalEndpoint,
|
|
||||||
API.INFO_PARAM_INST_SUFFIX,
|
|
||||||
institutionalEndpoint)
|
|
||||||
.getBody();
|
.getBody();
|
||||||
|
|
||||||
if (institutions != null && !institutions.isEmpty()) {
|
if (institutions != null && !institutions.isEmpty()) {
|
||||||
|
@ -248,12 +250,15 @@ public final class InstitutionalAuthenticationEntryPoint implements Authenticati
|
||||||
.getOrThrow();
|
.getOrThrow();
|
||||||
|
|
||||||
restTemplate.setRequestFactory(clientHttpRequestFactory);
|
restTemplate.setRequestFactory(clientHttpRequestFactory);
|
||||||
|
final Map<String, Object> uriVars = new HashMap<>();
|
||||||
|
uriVars.put(API.INFO_PARAM_INST_SUFFIX, institutionalEndpoint);
|
||||||
|
final String uriString = this.webserviceURIService.getURIBuilder()
|
||||||
|
.path(API.INFO_ENDPOINT + API.INSTITUTIONAL_LOGO_PATH)
|
||||||
|
.uriVariables(uriVars)
|
||||||
|
.toUriString();
|
||||||
final ResponseEntity<String> exchange = restTemplate
|
final ResponseEntity<String> exchange = restTemplate
|
||||||
.exchange(
|
.exchange(
|
||||||
this.webserviceURIService.getURIBuilder()
|
uriString,
|
||||||
.path(API.INFO_ENDPOINT + API.INSTITUTIONAL_LOGO_PATH)
|
|
||||||
.toUriString(),
|
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
HttpEntity.EMPTY,
|
HttpEntity.EMPTY,
|
||||||
String.class,
|
String.class,
|
||||||
|
|
Loading…
Reference in a new issue