PeerTube/server/helpers/token-generator.ts

20 lines
364 B
TypeScript
Raw Normal View History

import { buildUUID } from '@shared/extra-utils'
function generateRunnerRegistrationToken () {
return 'ptrrt-' + buildUUID()
}
function generateRunnerToken () {
return 'ptrt-' + buildUUID()
}
function generateRunnerJobToken () {
return 'ptrjt-' + buildUUID()
}
export {
generateRunnerRegistrationToken,
generateRunnerToken,
generateRunnerJobToken
}