File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
import https = require( 'https' ) ;
2
- import request = require( 'request' ) ;
3
2
4
3
import { User } from './config_types' ;
5
4
6
5
export interface Authenticator {
7
6
isAuthProvider ( user : User ) : boolean ;
8
- applyAuthentication ( user : User , opts : request . Options | https . RequestOptions ) : Promise < void > ;
7
+ applyAuthentication ( user : User , opts : https . RequestOptions ) : Promise < void > ;
9
8
}
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import yaml = require('js-yaml');
5
5
import net = require( 'net' ) ;
6
6
import path = require( 'path' ) ;
7
7
8
- import request = require( 'request' ) ;
9
8
import shelljs = require( 'shelljs' ) ;
10
9
11
10
import * as api from './api' ;
@@ -459,7 +458,7 @@ export class KubeConfig implements SecurityAuthentication {
459
458
return this . getContextObject ( this . currentContext ) ;
460
459
}
461
460
462
- private applyHTTPSOptions ( opts : request . Options | https . RequestOptions ) : void {
461
+ private applyHTTPSOptions ( opts : https . RequestOptions ) : void {
463
462
const cluster = this . getCurrentCluster ( ) ;
464
463
const user = this . getCurrentUser ( ) ;
465
464
if ( ! user ) {
@@ -483,7 +482,7 @@ export class KubeConfig implements SecurityAuthentication {
483
482
}
484
483
}
485
484
486
- private async applyAuthorizationHeader ( opts : request . Options | https . RequestOptions ) : Promise < void > {
485
+ private async applyAuthorizationHeader ( opts : https . RequestOptions ) : Promise < void > {
487
486
const user = this . getCurrentUser ( ) ;
488
487
if ( ! user ) {
489
488
return ;
@@ -504,7 +503,7 @@ export class KubeConfig implements SecurityAuthentication {
504
503
}
505
504
}
506
505
507
- private async applyOptions ( opts : request . Options | https . RequestOptions ) : Promise < void > {
506
+ private async applyOptions ( opts : https . RequestOptions ) : Promise < void > {
508
507
this . applyHTTPSOptions ( opts ) ;
509
508
await this . applyAuthorizationHeader ( opts ) ;
510
509
}
You can’t perform that action at this time.
0 commit comments