Skip to content

Commit b27ce70

Browse files
committed
remove request usages from auth
1 parent d9626f9 commit b27ce70

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import https = require('https');
2-
import request = require('request');
32

43
import { User } from './config_types';
54

65
export interface Authenticator {
76
isAuthProvider(user: User): boolean;
8-
applyAuthentication(user: User, opts: request.Options | https.RequestOptions): Promise<void>;
7+
applyAuthentication(user: User, opts: https.RequestOptions): Promise<void>;
98
}

src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ export class KubeConfig implements SecurityAuthentication {
483483
}
484484
}
485485

486-
private async applyAuthorizationHeader(opts: request.Options | https.RequestOptions): Promise<void> {
486+
private async applyAuthorizationHeader(opts: https.RequestOptions): Promise<void> {
487487
const user = this.getCurrentUser();
488488
if (!user) {
489489
return;
@@ -504,7 +504,7 @@ export class KubeConfig implements SecurityAuthentication {
504504
}
505505
}
506506

507-
private async applyOptions(opts: request.Options | https.RequestOptions): Promise<void> {
507+
private async applyOptions(opts: https.RequestOptions): Promise<void> {
508508
this.applyHTTPSOptions(opts);
509509
await this.applyAuthorizationHeader(opts);
510510
}

0 commit comments

Comments
 (0)