(clientId: string)
| 72 | } |
| 73 | |
| 74 | async function makeClientSecret(clientId: string): Promise<string> { |
| 75 | const data = new TextEncoder().encode(CONFIG.bridge_secret + clientId).buffer; |
| 76 | const hash = await crypto.subtle.digest('SHA-1', data); |
| 77 | return toHashString(hash); |
| 78 | } |
| 79 | |
| 80 | // All these endpoints can be accessed without authentication |
| 81 | export function setup(app: express.Express) { |