mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-19 17:13:31 -04:00
feat: add authenticatorHeader helper
This commit is contained in:
@@ -286,6 +286,15 @@ export class Client extends EventEmitter<Events> {
|
||||
return typeof this.#session === "string" ? undefined : this.#session?._id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get authentication header
|
||||
*/
|
||||
get authenticationHeader() {
|
||||
return typeof this.#session === "string"
|
||||
? ["X-Bot-Token", this.#session]
|
||||
: ["X-Session-Token", this.#session?.token as string];
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to Revolt
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user