|
1 | 1 | import {Channel} from "./Channel"; |
2 | 2 | import {AxiosResponse} from "axios"; |
3 | 3 |
|
4 | | -export type Options = { authEndpoint: string, host: string }; |
| 4 | +export type Options = { authEndpoint: string, host: string,bearerToken: string,auth: any }; |
5 | 5 | export type MessageBody = { event: string, channel?: string, data: object }; |
6 | 6 |
|
7 | 7 | export class Websocket { |
@@ -137,7 +137,7 @@ export class Websocket { |
137 | 137 | console.log(`Sending auth request for channel ${channel.name}`) |
138 | 138 |
|
139 | 139 | if (this.options.bearerToken) { |
140 | | - this.options.auth.headers['Authorization'] = 'Bearer ' + this.options.bearerToken; |
| 140 | + this.options.auth.headers['Authorization'] = 'Bearer ' + this.options.bearerToken; |
141 | 141 | } |
142 | 142 |
|
143 | 143 | axios.post(this.options.authEndpoint, { |
|
0 commit comments