KeyCloak - Useradministration

Viewed 21

I have an Angular-App and node.js/express REST API, protected by KeyCloak. All works really fine!

Now, I want to add, delete, change, etc.. to users in my App. I was successful in doing so in PostMan. How can I put those working PostMan-Code in my Angular-App

    var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://XXXXX/users/342743ß89w-ewdsd-saqwewq-ewq',
  'headers': {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer eeedwr342refdsfsf ... '
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Should I put those code in the node.js/express-API in a new route?

0 Answers
Related