diff --git a/examples/atlassian-connect-forge-spring-boot-sample/core/src/main/java/sample/connect/spring/atlaskit/BusinessLogicController.java b/examples/atlassian-connect-forge-spring-boot-sample/core/src/main/java/sample/connect/spring/atlaskit/BusinessLogicController.java index 1a79ef8..415f83f 100644 --- a/examples/atlassian-connect-forge-spring-boot-sample/core/src/main/java/sample/connect/spring/atlaskit/BusinessLogicController.java +++ b/examples/atlassian-connect-forge-spring-boot-sample/core/src/main/java/sample/connect/spring/atlaskit/BusinessLogicController.java @@ -88,14 +88,14 @@ public Map impersonation( AtlassianHost host = hostFromQuery(installationId, cloudId); try { manualAuthorizationService.authorize(host); + AtlassianHostUser hostUser = AtlassianHostUser.builder(host).withUserAccountId(accountId).build(); + JiraMyselfResponse myself = fetchJiraMyself(hostUser); + String label = myself != null ? myself.displayName() : accountId; + return message("Hello from BusinessLogicController. User: " + label); } catch (Exception e) { LOG.warn("Impersonation failed", e); return message("Impersonation failed: " + e.getMessage()); } - AtlassianHostUser hostUser = AtlassianHostUser.builder(host).withUserAccountId(accountId).build(); - JiraMyselfResponse myself = fetchJiraMyself(hostUser); - String label = myself != null ? myself.displayName() : accountId; - return message("Hello from BusinessLogicController. User: " + label); } private JiraMyselfResponse fetchJiraMyself(AtlassianHostUser user) { diff --git a/examples/atlassian-connect-forge-spring-boot-sample/forge-container/manifest.yml b/examples/atlassian-connect-forge-spring-boot-sample/forge-container/manifest.yml index c2b084e..2f4d921 100644 --- a/examples/atlassian-connect-forge-spring-boot-sample/forge-container/manifest.yml +++ b/examples/atlassian-connect-forge-spring-boot-sample/forge-container/manifest.yml @@ -23,9 +23,6 @@ services: app: id: ari:cloud:ecosystem::app/cbad754b-3ea4-4759-a6ef-eb575b1a7427 - connect: - key: runtime-bridge-spring-boot-sample-atlaskit - remote: java-service runtime: name: nodejs24.x @@ -48,7 +45,7 @@ modules: - key: impersonation-ep service: java-service route: - path: /api/impersonation + path: /api resources: - key: main diff --git a/examples/atlassian-connect-forge-spring-boot-sample/forge-container/src/main/java/sample/connect/spring/atlaskit/ContainerHealthEndpoint.java b/examples/atlassian-connect-forge-spring-boot-sample/forge-container/src/main/java/sample/connect/spring/atlaskit/ContainerHealthEndpoint.java index b840caf..8609503 100644 --- a/examples/atlassian-connect-forge-spring-boot-sample/forge-container/src/main/java/sample/connect/spring/atlaskit/ContainerHealthEndpoint.java +++ b/examples/atlassian-connect-forge-spring-boot-sample/forge-container/src/main/java/sample/connect/spring/atlaskit/ContainerHealthEndpoint.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RestController; @RestController -@RequestMapping("/ping") +@RequestMapping("/health") public class ContainerHealthEndpoint { @GetMapping