Hello,
I have used bearer auth only in my REST API, and I am sending an
Authorization Bearer header in GET request from the front end.
*Protect.js*
......
return function protect (request, response, next) {
if (request.kauth && request.kauth.grant) {* // Line 2*
if (!guard || guard(request.kauth.grant.access_token, request,
response)) {
return next();
}
return keycloak.accessDenied(request, response, next);
}
........
*When I am invoking protect.js in my GET request:-*
router.get('/', cors(), keycloak.protect(), function (req, res, next) { }
Line 2, which is the if statement is turning out to be false, so* I wanted
to know why is request.kauth and request.kauth.grant returning false?*
Thanks in advance
Saransh
Show replies by date