UNPKG

fnbr

Version:

A library to interact with Epic Games' Fortnite HTTP and XMPP services

67 lines (66 loc) 2.15 kB
import Base from '../Base'; import { AuthSessionStoreKey } from '../../resources/enums'; import FortniteAuthSession from './FortniteAuthSession'; import LauncherAuthSession from './LauncherAuthSession'; import FortniteClientCredentialsAuthSession from './FortniteClientCredentialsAuthSession'; import EOSAuthSession from './EOSAuthSession'; import type { AuthSessionStore } from '../../resources/structs'; import type Client from '../Client'; type AuthSessionStoreType = AuthSessionStore<AuthSessionStoreKey, FortniteAuthSession | LauncherAuthSession | FortniteClientCredentialsAuthSession | EOSAuthSession>; /** * Represents the client's authentication manager * @private */ declare class Auth extends Base { /** * The client's auth sessions */ sessions: AuthSessionStoreType; /** * @param client The main client */ constructor(client: Client); /** * Authenticates the client against EpicGames' API */ authenticate(): Promise<void>; /** * Kills all active auth sessions */ revokeAllTokens(): Promise<void>; /** * Accepts the Fortnite End User License Agreement (EULA) */ private acceptEULA; /** * Creates a device auth */ private createDeviceAuth; /** * Authentication via a device auth * @param deviceAuthResolvable A resolvable device auth */ private deviceAuthAuthenticate; /** * Authentication via an exchange code * @param exchangeCodeResolvable A resolvable exchange code */ private exchangeCodeAuthenticate; /** * Authentication via an authorization code * @param authorizationCodeResolvable A resolvable authorization code */ private authorizationCodeAuthenticate; /** * Authentication via a refresh token * @param refreshTokenResolvable A resolvable refresh token */ private refreshTokenAuthenticate; /** * Authentication via a launcher refresh token * @param refreshTokenResolvable A resolvable refresh token */ private launcherRefreshTokenAuthenticate; private fortniteEOSAuthenticate; } export default Auth;