class Authenticator
extends EventTarget
import { Authenticator } from "https://deno.land/x/muse@0.0.97/auth.ts";
Authenticates with youtube's API
Methods
get_headers(): Promise<{ Authorization?: string; }>
Smartly load a token, when you have already loaded one If a token is present, it will check if it is expired
load_token_with_code(login_code: LoginCode, signal?: AbortSignal): Promise<Token>
After getting a login code, get a token
deprecated
load_token_with_code(): Promise<Token>interface Authenticator
implements EventTarget
import { type Authenticator } from "https://deno.land/x/muse@0.0.97/auth.ts";
Methods
addEventListener<K extends keyof AuthenticatorEventMap>(): void
type: K,
listener: (this: Authenticator, ev: AuthenticatorEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof AuthenticatorEventMap>(): void
type: K,
listener: (this: Authenticator, ev: AuthenticatorEventMap[K]) => any,
options?: boolean | EventListenerOptions,