I secured my NODE.js App with keycloak and it works fine
var Keycloak = require('keycloak-connect');
var session = require('express-session');
var keycloak = null;
var memoryStore = new session.MemoryStore();
keycloak = new Keycloak({
store: memoryStore
});
app.get('/portal', keycloak.protect(), function (req, res) {
res.sendFile(path.join(__dirname, '/views/index.html'));
});
in the portal (index.html) I have to show / hide different parts of the page according to the user's role in keycloak. Is there a chance to read the roles of the current user?