identityserver2

How to add claims to access token get from IdentityServer3 using resource owner flow with javascript client

為{幸葍}努か 提交于 2019-12-03 10:38:49
问题 I use the resource owner flow with IdentityServer3 and send get token request to identity server token endpoint with username and password in javascript as below: function getToken() { var uid = document.getElementById("username").value; var pwd = document.getElementById("password").value; var xhr = new XMLHttpRequest(); xhr.onload = function (e) { console.log(xhr.status); console.log(xhr.response); var response_data = JSON.parse(xhr.response); if (xhr.status === 200 && response_data.access