Class YggdrasilClient
🏭 Constructors
constructor
ts
YggdrasilClient(api: string, options: YggdrasilClientOptions): YggdrasilClient
Create client for official-like api endpoint
Parameters
- api:
string
The official-like api endpoint - options:
YggdrasilClientOptions
Return Type
YggdrasilClient
Defined in: packages/user/yggdrasil.ts:106
🏷️ Properties
api public
ts
api: string
The official-like api endpoint
Defined in: packages/user/yggdrasil.ts:106
fetch protected
ts
fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>
Defined in: packages/user/yggdrasil.ts:98
File protected
ts
File: (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag) => File
Defined in: packages/user/yggdrasil.ts:100
FormData protected
ts
FormData: (form?: HTMLFormElement, submitter?: null | HTMLElement) => FormData
Defined in: packages/user/yggdrasil.ts:99
headers protected
ts
headers: Record<string, string>
Defined in: packages/user/yggdrasil.ts:97
🔧 Methods
invalidate
ts
invalidate(accessToken: string, clientToken: string, signal: AbortSignal): Promise<boolean>
Parameters
- accessToken:
string
- clientToken:
string
- signal:
AbortSignal
Return Type
Promise<boolean>
Defined in: packages/user/yggdrasil.ts:126
login
ts
login(__namedParameters: { clientToken: string; password: string; requestUser?: boolean; username: string }, signal: AbortSignal): Promise<YggrasilAuthentication>
Parameters
- __namedParameters:
{ clientToken: string; password: string; requestUser?: boolean; username: string }
- signal:
AbortSignal
Return Type
Promise<YggrasilAuthentication>
Defined in: packages/user/yggdrasil.ts:138
refresh
ts
refresh(__namedParameters: { accessToken: string; clientToken: string; requestUser?: boolean }, signal: AbortSignal): Promise<YggrasilAuthentication>
Parameters
- __namedParameters:
{ accessToken: string; clientToken: string; requestUser?: boolean }
- signal:
AbortSignal
Return Type
Promise<YggrasilAuthentication>
Defined in: packages/user/yggdrasil.ts:164
validate
ts
validate(accessToken: string, clientToken: string, signal: AbortSignal): Promise<boolean>
Parameters
- accessToken:
string
- clientToken:
string
- signal:
AbortSignal
Return Type
Promise<boolean>
Defined in: packages/user/yggdrasil.ts:113