@kubernetes/client-node
Version:
NodeJS client for kubernetes
26 lines (25 loc) • 840 B
TypeScript
import https from 'node:https';
import { Authenticator } from './auth.js';
import { User } from './config_types.js';
interface JwtObj {
header: any;
payload: any;
signature: string;
}
export declare class OpenIDConnectAuth implements Authenticator {
static decodeJWT(token: string): JwtObj | null;
static expirationFromToken(token: string): number;
private currentTokenExpiration;
isAuthProvider(user: User): boolean;
/**
* Setup the authentication header for oidc authed clients
* @param user user info
* @param opts request options
* @param overrideClient for testing, a preconfigured oidc client
*/
applyAuthentication(user: User, opts: https.RequestOptions, overrideClient?: any): Promise<void>;
private getToken;
private refresh;
private getClient;
}
export {};