remove sampletoken generation
This commit is contained in:
parent
740d7f10f5
commit
5c259484ee
@ -4,14 +4,6 @@ import { getConnectionManager } from 'typeorm';
|
|||||||
import { IllegalJWTError, NoPermissionError, UserNonexistantOrRefreshtokenInvalidError } from './errors/AuthError';
|
import { IllegalJWTError, NoPermissionError, UserNonexistantOrRefreshtokenInvalidError } from './errors/AuthError';
|
||||||
import { User } from './models/entities/User';
|
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[]) => {
|
const authchecker = async (action: Action, permissions: string | string[]) => {
|
||||||
let required_permissions = undefined
|
let required_permissions = undefined
|
||||||
if (typeof permissions === "string") {
|
if (typeof permissions === "string") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user