From 0e6909d5eebbcda3a91c443c9616455b1454e634 Mon Sep 17 00:00:00 2001 From: George Gastaldi Date: Mon, 15 Apr 2019 20:39:15 +0000 Subject: [PATCH] feature: add OpenShiftCluster#getOauthUrl Fixes #972 --- .../service/openshift/api/OpenShiftCluster.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/openshift-service-api/src/main/java/io/fabric8/launcher/service/openshift/api/OpenShiftCluster.java b/services/openshift-service-api/src/main/java/io/fabric8/launcher/service/openshift/api/OpenShiftCluster.java index 361b0d50a..48080c45d 100644 --- a/services/openshift-service-api/src/main/java/io/fabric8/launcher/service/openshift/api/OpenShiftCluster.java +++ b/services/openshift-service-api/src/main/java/io/fabric8/launcher/service/openshift/api/OpenShiftCluster.java @@ -1,12 +1,13 @@ package io.fabric8.launcher.service.openshift.api; -import javax.annotation.Nullable; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.fabric8.launcher.base.Paths; import org.immutables.value.Value; +import javax.annotation.Nullable; + /** * @author George Gastaldi */ @@ -30,4 +31,9 @@ default String getName() { @Nullable String getConsoleUrl(); + + @Value.Default + default String getOauthUrl() { + return Paths.join(getApiUrl(), "/oauth/authorize"); + } }