* Generates a session id * @function genSessionID * @param {String} type Session type * @returns {string}
(type = 'xs')
| 6 | * @returns {string} |
| 7 | */ |
| 8 | genSessionID(type = 'xs') { |
| 9 | let r = ''; |
| 10 | const c = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
| 11 | for (let i = 0; i < 12; i += 1) r += c.charAt(Math.floor(Math.random() * c.length)); |
| 12 | return `${type}_${r}`; |
| 13 | }, |
| 14 | |
| 15 | genAuthCookies(sessionId = '', signature = '') { |
| 16 | if (!sessionId) return ''; |
no outgoing calls
no test coverage detected