.
This commit is contained in:
parent
a5bd6dd1cf
commit
234acc6577
1 changed files with 25 additions and 0 deletions
|
|
@ -46,12 +46,37 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
|
|||
}
|
||||
|
||||
public RequestInfoUpdate requestOnDemandCompany(BaseRequest<GatewayTaskRequest> userRequest) {
|
||||
log.debug("LOCM task received");
|
||||
|
||||
RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest);
|
||||
if (requestInfoUpdate != null) return requestInfoUpdate;
|
||||
|
||||
String url = formingInboundUrl(inboundServerSettings.getPathLOCM());
|
||||
String response = restTemplate.getForObject(url, String.class);
|
||||
|
||||
log.debug("LOCM task complete, response: {}", response);
|
||||
return null;
|
||||
}
|
||||
|
||||
public RequestInfoUpdate requestOnDemandSecurity(BaseRequest<GatewayTaskRequest> userRequest) {
|
||||
log.debug("LOSC task received");
|
||||
|
||||
RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest);
|
||||
if (requestInfoUpdate != null) return requestInfoUpdate;
|
||||
|
||||
String url = formingInboundUrl(inboundServerSettings.getPathLOSC());
|
||||
String response = restTemplate.getForObject(url, String.class);
|
||||
|
||||
log.debug("LOSC task complete, response: {}", response);
|
||||
return null;
|
||||
}
|
||||
|
||||
private String formingInboundUrl(String path) {
|
||||
return "%s://%s:%s/%s".formatted(
|
||||
inboundServerSettings.getEnableSsl() ? "https" : "http",
|
||||
inboundServerSettings.getHost(),
|
||||
inboundServerSettings.getPort(),
|
||||
path
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue