SHARE
TWEET

Untitled

a guest Jun 12th, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Testing app listening at http://localhost:38509
  2. Testing app listening at http://localhost:43597
  3. Using chromedriver from path: /home/mhajas/work/keycloak-nodejs-connect/node_modules/chromedriver/lib/chromedriver/chromedriver
  4. Testing app listening at http://localhost:35469
  5. TAP version 13
  6. # GrantManager with empty configuration
  7. ok 1 should throw
  8. # GrantManager with rogue configuration
  9. ok 2 should be equal
  10. ok 3 should be equal
  11. ok 4 should be equal
  12. ok 5 should be equal
  13. # GrantManager in public mode should be able to obtain a grant
  14. ok 6 should not be equal
  15. # GrantManager in public mode should be able to obtain a raw grant
  16. ok 7 should not be equal
  17. # GrantManager in public mode with public key configured should be able to obtain a grant
  18. Chrome browser version: 75.0.3770.80
  19. Chromedriver version: 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29})
  20. ok 8 should not be equal
  21. # GrantManager in public mode should be able to refresh a grant
  22. ok 9 should be truthy
  23. # GrantManager should return empty with public key configured but invalid signature
  24. ok 10 should be equal
  25. # GrantManager in public mode should be able to get userinfo
  26. ok 11 should be equal
  27. # GrantManager in confidential mode should be able to get userinfo
  28. ok 12 should be equal
  29. # GrantManager in confidential mode should be able to obtain a grant
  30. ok 13 should not be equal
  31. # GrantManager in confidential mode should be able to refresh a grant
  32. ok 14 should not be equal
  33. ok 15 should be truthy
  34. ok 16 should not be equal
  35. ok 17 should not be equal
  36. # GrantManager in confidential mode should be able to validate a valid token
  37. ok 18 should not be equal
  38. ok 19 should be equal
  39. # GrantManager in confidential mode should be able to validate an invalid token
  40. ok 20 should be equal
  41. # GrantManager in confidential mode should be able to validate a token has an invalid signature
  42. ok 21 should be equal
  43. # GrantManager in confidential mode should be able to validate a valid token string
  44. ok 22 should not be equal
  45. ok 23 should be equal
  46. # GrantManager in confidential mode should be able to validate an invalid token string
  47. ok 24 should be equal
  48. # GrantManager in confidential mode should be able to obtain a service account grant
  49. ok 25 should be equal
  50. # GrantManager should be able to validate tokens in a grant
  51. ok 26 should not be equal
  52. ok 27 should be equal
  53. ok 28 should be equal
  54. ok 29 should be equal
  55. # GrantManager should be able to remove invalid tokens from a grant
  56. ok 30 should be equal
  57. ok 31 should be equal
  58. # GrantManager should reject with token missing error when bearer only
  59. ok 32 should be equal
  60. ok 33 should be equal
  61. # GrantManager should not be able to refresh a grant when bearer only
  62. ok 34 should be falsy
  63. # GrantManager should reject with refresh token missing error
  64. ok 35 should be equal
  65. ok 36 should be equal
  66. # GrantManager validate empty access token
  67. ok 37 should be equal
  68. # GrantManager return user realm role
  69. ok 38 should be truthy
  70. # GrantManager validate non existent role
  71. ok 39 should be falsy
  72. # GrantManager should be false for user with no realm level roles
  73. ok 40 should be falsy
  74. # GrantManager validate non existent role app
  75. ok 41 should be falsy
  76. # GrantManager validate existent role app
  77. ok 42 should be truthy
  78. # GrantManager validate role app with empty clientId
  79. ok 43 should be falsy
  80. # GrantManager validate empty role app
  81. ok 44 should be falsy
  82. # GrantManager return user realm role based on realm name
  83. ok 45 should be truthy
  84. # GrantManager in confidential mode should use callback if provided and validate access token
  85. ok 46 should be equal
  86. # GrantManager should be able to remove expired access_token token and keep others
  87. ok 47 should be equal
  88. ok 48 should be equal
  89. # GrantManager should return empty when trying to obtain from code with empty params
  90. ok 49 should be equal
  91. # GrantManager should raise an error when trying to obtain from code with rogue params
  92. ok 50 should be equal
  93. # GrantManager should be able to validate invalid ISS
  94. ok 51 should be equal
  95. # GrantManager should be able to validate invalid iat
  96. ok 52 should be equal
  97. # GrantManager should be ensure that a grant is fresh
  98. ok 53 should not be equal
  99. # GrantManager should raise an error when access token and refresh token do not exist
  100. ok 54 should be equal
  101. # GrantManager should validate unsigned token
  102. ok 55 should be equal
  103. # GrantManager should not validate token with wrong type
  104. ok 56 should be equal
  105. # GrantManager should fail to load public key when kid is empty
  106. ok 57 should be equal
  107. # GrantManager should fail with invalid signature
  108. ok 58 should be equal
  109. # GrantManager#obtainDirectly should work with https
  110. ok 59 should be equal
  111. # GrantManager#ensureFreshness should fetch new access token with client id
  112. ok 60 should be truthy
  113. # GrantManager#validateToken returns undefined for an invalid token
  114. # GrantManager should be able to refresh token after accessTokenLifespan
  115. ok 61 invalid token (missing)
  116. ok 62 invalid token (expired)
  117. ok 63 invalid token (not signed)
  118. ok 64 invalid token (wrong type)
  119. (node:3754) UnhandledPromiseRejectionWarning: Error: Nock: No match for request {
  120.   "method": "POST",
  121.   "url": "http://localhost:8080/auth/realms/tokenRealmTest/protocol/openid-connect/token",
  122.   "headers": {
  123.     "content-type": "application/x-www-form-urlencoded",
  124.     "x-client": "keycloak-nodejs-connect",
  125.     "authorization": "Basic Y3VzdG9tZXItcG9ydGFsOnBhc3N3b3Jk",
  126.     "content-length": 105
  127.   },
  128.   "body": "client_id=customer-portal&username=bburke%40redhat.com&password=password&grant_type=password&scope=openid"
  129. }
  130.     at end (/home/mhajas/work/keycloak-nodejs-connect/node_modules/nock/lib/request_overrider.js:277:17)
  131.     at /home/mhajas/work/keycloak-nodejs-connect/node_modules/nock/lib/request_overrider.js:160:9
  132.     at OverriddenClientRequest.RequestOverrider.req.write (/home/mhajas/work/keycloak-nodejs-connect/node_modules/nock/lib/request_overrider.js:139:9)
  133.     at OverriddenClientRequest.RequestOverrider.req.end (/home/mhajas/work/keycloak-nodejs-connect/node_modules/nock/lib/request_overrider.js:156:11)
  134.     at Promise (/home/mhajas/work/keycloak-nodejs-connect/middleware/auth-utils/grant-manager.js:525:9)
  135.     at new Promise (<anonymous>)
  136.     at fetch (/home/mhajas/work/keycloak-nodejs-connect/middleware/auth-utils/grant-manager.js:508:10)
  137.     at GrantManager.obtainDirectly (/home/mhajas/work/keycloak-nodejs-connect/middleware/auth-utils/grant-manager.js:70:18)
  138.     at Test.test (/home/mhajas/work/keycloak-nodejs-connect/test/grant-manager-token-timeout-spec.js:11:11)
  139.     at Test.bound [as _cb] (/home/mhajas/work/keycloak-nodejs-connect/node_modules/tape/lib/test.js:76:32)
  140. (node:3754) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 15)
  141. (node:3754) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top