diff --git a/src/auth.ts b/src/auth.ts index 1fc7cd2732..78b226deea 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -1,9 +1,8 @@ import https = require('https'); -import request = require('request'); import { User } from './config_types'; export interface Authenticator { isAuthProvider(user: User): boolean; - applyAuthentication(user: User, opts: request.Options | https.RequestOptions): Promise; + applyAuthentication(user: User, opts: https.RequestOptions): Promise; } diff --git a/src/config.ts b/src/config.ts index d73c1cc755..7743087ed7 100644 --- a/src/config.ts +++ b/src/config.ts @@ -5,7 +5,6 @@ import yaml = require('js-yaml'); import net = require('net'); import path = require('path'); -import request = require('request'); import shelljs = require('shelljs'); import * as api from './api'; @@ -459,7 +458,7 @@ export class KubeConfig implements SecurityAuthentication { return this.getContextObject(this.currentContext); } - private applyHTTPSOptions(opts: request.Options | https.RequestOptions): void { + private applyHTTPSOptions(opts: https.RequestOptions): void { const cluster = this.getCurrentCluster(); const user = this.getCurrentUser(); if (!user) { @@ -483,7 +482,7 @@ export class KubeConfig implements SecurityAuthentication { } } - private async applyAuthorizationHeader(opts: request.Options | https.RequestOptions): Promise { + private async applyAuthorizationHeader(opts: https.RequestOptions): Promise { const user = this.getCurrentUser(); if (!user) { return; @@ -504,7 +503,7 @@ export class KubeConfig implements SecurityAuthentication { } } - private async applyOptions(opts: request.Options | https.RequestOptions): Promise { + private async applyOptions(opts: https.RequestOptions): Promise { this.applyHTTPSOptions(opts); await this.applyAuthorizationHeader(opts); }