remove sampletoken generation

This commit is contained in:
Philipp Dormann 2020-12-05 18:02:57 +01:00
parent 740d7f10f5
commit 5c259484ee
1 changed files with 0 additions and 8 deletions

View File

@ -4,14 +4,6 @@ import { getConnectionManager } from 'typeorm';
import { IllegalJWTError, NoPermissionError, UserNonexistantOrRefreshtokenInvalidError } from './errors/AuthError';
import { User } from './models/entities/User';
// -----------
const sampletoken = jwt.sign({
"permissions": {
"TRACKS": ["read", "update", "delete", "add"]
// "TRACKS": []
}
}, "securekey")
console.log(`sampletoken: ${sampletoken}`);
// -----------
const authchecker = async (action: Action, permissions: string | string[]) => {
let required_permissions = undefined
if (typeof permissions === "string") {