Open Mohsinfistix opened 2 years ago
@Mohsinfistix you need to provide more context and explanation than just posting code if you expect any help.
Agreed @Mohsinfistix needs to provide more context, however, I want to ask, if I passes a Bearer token in an authorization header, should I expect accessToken to equal that bearer token?
@proftom that is my understanding. I haven not checked myself but would be easy enough to test in isolation.
I am having a similar issue, the access token is not defined but I do have a bearer token in the header
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isAuthorizedByRole = void 0; const KeycloakContext_1 = require("../KeycloakContext"); /*
context.${KeycloakContext_1.CONTEXT_KEY} is missing. Keycloak integration is probably misconfigured
); return false; } for (const role of roles) { if (context[KeycloakContext_1.CONTEXT_KEY].hasRole(role)) { return true; } } return false; } exports.isAuthorizedByRole = isAuthorizedByRole;