Class YggdrasilThirdPartyClient
🏭 Constructors
constructor
new YggdrasilThirdPartyClient(api: string, options: YggdrasilClientOptions): YggdrasilThirdPartyClient
Create thirdparty (authlib-injector) style client
Parameters
- api:
string
The api url following https://github.com/yushijinhun/authlib-injector/wiki/Yggdrasil-服务端技术规范 - options:
YggdrasilClientOptions
Return Type
YggdrasilThirdPartyClient
Defined in: packages/user/yggdrasil.ts:234
🏷️ Properties
api
api: string
The official-like api endpoint Inherited from: YggdrasilClient.api
Defined in: packages/user/yggdrasil.ts:101
dispatcher
dispatcher: Dispatcher
Inherited from: YggdrasilClient.dispatcher
Defined in: packages/user/yggdrasil.ts:94
headers
headers: Record<string, string>
Inherited from: YggdrasilClient.headers
Defined in: packages/user/yggdrasil.ts:95
profileApi
profileApi: string
Defined in: packages/user/yggdrasil.ts:226
textureApi
textureApi: string
Defined in: packages/user/yggdrasil.ts:227
🔧 Methods
invalidate
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
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
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
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
setTexture(options: SetTextureOption, signal: AbortSignal): Promise<void>
Parameters
- options:
SetTextureOption
- signal:
AbortSignal
Return Type
Promise<void>
Defined in: packages/user/yggdrasil.ts:276
validate
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