Commit afecb494 authored by Labros Papadopoulos's avatar Labros Papadopoulos
Browse files

feat: use oidc base url to retrieve oidc provider access token

parent e83ab018
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ public interface OssLifecycleDataToOssClientDataMapper {
    @Mapping(target = "id", ignore = true)
    @Mapping(target = "organizationId", ignore = true)
    @Mapping(target = "healthCheckCounter", ignore = true)
    @Mapping(target = "oauth2TokenUri", source = "authUrl")
    @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
    OssClientData mapToOssClientData(
            OssLifecycleData ossLifecycleData, @MappingTarget OssClientData ossClientData);
+1 −1
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ public class OssRestClientImpl {
                    "Request failed for %s, attempting to refresh token and retry: " + e.getMessage(), name);

            // Force refresh token
            tokens = createToken(name, baseUrl, clientId, secret, user, pass);
            tokens = createToken(name, authUrl, clientId, secret, user, pass);
            tokenCache.put(orgId, tokens); // Update cache

            try {
+3 −0
Original line number Diff line number Diff line
@@ -80,6 +80,9 @@ public class HealthCheckService {
                }

            } catch (Exception e) {
                logger.debugf(
                        "Heartbeat check failed for organization %s because of: %s",
                        ossClientDatum.getName(), e.getMessage());
                handleHealthCheckFailure(ossClientDatum, e);
            }
        }