Skip to content

Class YggdrasilThirdPartyClient

🏭 Constructors

constructor

ts
new YggdrasilThirdPartyClient(api: string, options: YggdrasilClientOptions): YggdrasilThirdPartyClient

Create thirdparty (authlib-injector) style client

Parameters

Return Type

  • YggdrasilThirdPartyClient

Defined in: packages/user/yggdrasil.ts:234

🏷️ Properties

api

ts
api: string

The official-like api endpoint Inherited from: YggdrasilClient.api

Defined in: packages/user/yggdrasil.ts:101

dispatcher

ts
dispatcher: Dispatcher

Inherited from: YggdrasilClient.dispatcher

Defined in: packages/user/yggdrasil.ts:94

headers

ts
headers: Record<string, string>

Inherited from: YggdrasilClient.headers

Defined in: packages/user/yggdrasil.ts:95

profileApi

ts
profileApi: string

Defined in: packages/user/yggdrasil.ts:226

textureApi

ts
textureApi: string

Defined in: packages/user/yggdrasil.ts:227

🔧 Methods

invalidate

ts
invalidate(accessToken: string, clientToken: string, signal: AbortSignal): Promise<boolean>

Parameters

  • accessToken: string
  • clientToken: string
  • signal: AbortSignal

Return Type

  • Promise<boolean>

Inherited from: YggdrasilClient.invalidate

Defined in: packages/user/yggdrasil.ts:120

login

ts
login(__namedParameters: Object, signal: AbortSignal): Promise<YggrasilAuthentication>

Parameters

  • __namedParameters: Object
  • signal: AbortSignal

Return Type

  • Promise<YggrasilAuthentication>

Inherited from: YggdrasilClient.login

Defined in: packages/user/yggdrasil.ts:133

lookup

ts
lookup(uuid: string, unsigned: boolean= true, signal: AbortSignal): Promise<GameProfileWithProperties>

Parameters

  • uuid: string
  • unsigned: boolean
  • signal: AbortSignal

Return Type

  • Promise<GameProfileWithProperties>

Defined in: packages/user/yggdrasil.ts:246

refresh

ts
refresh(__namedParameters: Object, signal: AbortSignal): Promise<YggrasilAuthentication>

Parameters

  • __namedParameters: Object
  • signal: AbortSignal

Return Type

  • Promise<YggrasilAuthentication>

Inherited from: YggdrasilClient.refresh

Defined in: packages/user/yggdrasil.ts:160

setTexture

ts
setTexture(options: SetTextureOption, signal: AbortSignal): Promise<void>

Parameters

  • options: SetTextureOption
  • signal: AbortSignal

Return Type

  • Promise<void>

Defined in: packages/user/yggdrasil.ts:276

validate

ts
validate(accessToken: string, clientToken: string, signal: AbortSignal): Promise<boolean>

Parameters

  • accessToken: string
  • clientToken: string
  • signal: AbortSignal

Return Type

  • Promise<boolean>

Inherited from: YggdrasilClient.validate

Defined in: packages/user/yggdrasil.ts:106

Released under the MIT License.