diff --git a/lib/openshift-rest-client.js b/lib/openshift-rest-client.js index f6872b2..12585ac 100644 --- a/lib/openshift-rest-client.js +++ b/lib/openshift-rest-client.js @@ -85,7 +85,7 @@ async function openshiftClient (settings = {}) { const user = config.auth.username || config.auth.user; const password = config.auth.password || config.auth.pass; - const accessToken = await getTokenFromBasicAuth({ insecureSkipTlsVerify, url, user, password, authUrl }); + const accessToken = config.auth.token ? config.auth.token : await getTokenFromBasicAuth({ insecureSkipTlsVerify, url, user, password, authUrl }); const clusterUrl = authUrl || url; // Create clusterName from clusterUrl by removing 'https://' const clusterName = clusterUrl.replace(/(^\w+:|^)\/\//, '');