MCPcopy Create free account
hub / github.com/RealDevSquad/website-backend / getAuthToken

Method getAuthToken

services/EventTokenService.js:52–63  ·  view source on GitHub ↗
({ roomId, userId, role })

Source from the content-addressed store, hash-verified

50
51 // Generate new Auth token for a peer
52 getAuthToken({ roomId, userId, role }) {
53 const payload = {
54 access_key: EventTokenService.#app_access_key,
55 room_id: roomId,
56 user_id: userId,
57 role: role,
58 type: "app",
59 version: 2,
60 iat: Math.floor(Date.now() / 1000),
61 };
62 return this.#signPayloadToToken(payload);
63 }
64}
65
66module.exports = { EventTokenService };

Callers 1

joinEventFunction · 0.80

Calls 1

#signPayloadToTokenMethod · 0.95

Tested by

no test coverage detected