Guest User

Untitled

a guest
Jul 19th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. var settings = {
  2. method: "POST",
  3. url: tokenEndPoint.concat("/connect/token"),
  4. data: {
  5. username: "username",
  6. password: "password",
  7. grant_type: "password",
  8. client_id: "webui",
  9. client_secret: "32c8e1f3-594d-406a-8e33-644cfa7959c5",
  10. scope: "openid profile webui"
  11. },
  12. headers: {
  13. 'Content-Type': 'application/x-www-form-urlencoded'
  14. }
  15. };
  16.  
  17. function onGetTokenSuccess(response) {
  18. return response.data;
  19. }
  20.  
  21. function onGetTokenFailed(error) {
  22. logger.error('XHR Failed for token request.' + error);
  23. }
  24.  
  25. $http(settings).then(onGetTokenSuccess).catch(onGetTokenFailed);
  26.  
  27. [12:20:22 Information] IdentityServer4.Hosting.IdentityServerMiddleware
  28. Invoking IdentityServer endpoint: IdentityServer4.Endpoints.TokenEndpoint for /connect/token
  29.  
  30. [12:20:22 Information] IdentityServer4.Validation.TokenRequestValidator
  31. User authentication failed: Invalid username or password.
  32.  
  33. {
  34. "Enabled": "true",
  35. "ClientId": "webui",
  36. "ClientName": "Web UI",
  37. "ClientSecrets": [
  38. {
  39. "Description": "32c8e1f3-594d-406a-8e33-644cfa7959c5",
  40. "Expiration": "",
  41. "Type": "SharedSecret",
  42. "Value": "Q3ADcd+nptsnMpvXvCMvquwFd8i26ImBsncNGg/UG/w="
  43. }
  44. ],
  45. "UserClaims": [
  46. "role"
  47. ],
  48. "AllowedGrantTypes": [
  49. "password"
  50. ],
  51. "AllowedScopes": [
  52. "openid",
  53. "profile",
  54. "webui"
  55. ]
  56. }
Add Comment
Please, Sign In to add comment