diff --git a/src/main/groovy/io/seqera/wave/service/CredentialServiceImpl.groovy b/src/main/groovy/io/seqera/wave/service/CredentialServiceImpl.groovy index 0d424155f..f4cc4e68c 100644 --- a/src/main/groovy/io/seqera/wave/service/CredentialServiceImpl.groovy +++ b/src/main/groovy/io/seqera/wave/service/CredentialServiceImpl.groovy @@ -102,7 +102,7 @@ class CredentialServiceImpl implements CredentialsService { } CredentialsDescription findComputeCreds(PlatformId identity) { - final describeWorkflowLaunchResponse = towerClient.fetchWorkflowLaunchInfo(identity.towerEndpoint,identity.accessToken,identity.workflowId) + final describeWorkflowLaunchResponse = towerClient.fetchWorkflowLaunchInfo(identity.towerEndpoint, JwtAuth.of(identity), identity.workflowId) if(describeWorkflowLaunchResponse) { ComputeEnv computeEnv = describeWorkflowLaunchResponse.get()?.launch?.computeEnv if (computeEnv && (computeEnv.platform == 'aws-batch' || computeEnv.platform == 'google-batch')) { diff --git a/src/main/groovy/io/seqera/wave/tower/client/TowerClient.groovy b/src/main/groovy/io/seqera/wave/tower/client/TowerClient.groovy index 9cd844488..b4e5312ee 100644 --- a/src/main/groovy/io/seqera/wave/tower/client/TowerClient.groovy +++ b/src/main/groovy/io/seqera/wave/tower/client/TowerClient.groovy @@ -114,9 +114,9 @@ class TowerClient { StringUtils.removeEnd(endpoint, "/") } - CompletableFuture fetchWorkflowLaunchInfo(String towerEndpoint, String authorization, String workflowId){ + CompletableFuture fetchWorkflowLaunchInfo(String towerEndpoint, JwtAuth authorization, String workflowId){ def uri = workflowLaunchInfoEndpoint(towerEndpoint,workflowId) - return getAsync(uri, towerEndpoint, authorization,DescribeWorkflowLaunchResponse.class) + return getAsync(uri, towerEndpoint, authorization, DescribeWorkflowLaunchResponse.class) } protected static URI workflowLaunchInfoEndpoint(String towerEndpoint, String workflowId) { return URI.create("${checkEndpoint(towerEndpoint)}/workflow/${workflowId}/launch")