descope 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yaml +15 -27
  3. data/.github/workflows/publish-gem.yaml +36 -0
  4. data/Gemfile +12 -14
  5. data/Gemfile.lock +40 -87
  6. data/README.md +39 -17
  7. data/examples/ruby/access_key_app.rb +4 -2
  8. data/examples/ruby/management/Gemfile.lock +2 -2
  9. data/examples/ruby/management/role_app.rb +8 -3
  10. data/examples/ruby-on-rails-api/descope/.gitignore +58 -28
  11. data/examples/ruby-on-rails-api/descope/Gemfile.lock +3 -3
  12. data/examples/ruby-on-rails-api/descope/app/assets/builds/App.css +62 -0
  13. data/examples/ruby-on-rails-api/descope/app/assets/builds/App.css.map +7 -0
  14. data/examples/ruby-on-rails-api/descope/app/assets/builds/application.css +62 -0
  15. data/examples/ruby-on-rails-api/descope/app/assets/builds/application.css.map +7 -0
  16. data/examples/ruby-on-rails-api/descope/app/assets/builds/application.js +40369 -0
  17. data/examples/ruby-on-rails-api/descope/app/assets/builds/application.js.map +7 -0
  18. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.css +62 -0
  19. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.css.map +7 -0
  20. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.js +27979 -0
  21. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.js.map +7 -0
  22. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.css +62 -0
  23. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.css.map +7 -0
  24. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.js +27118 -0
  25. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.js.map +7 -0
  26. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.css +62 -0
  27. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.css.map +7 -0
  28. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.js +27113 -0
  29. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.js.map +7 -0
  30. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.css +62 -0
  31. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.css.map +7 -0
  32. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.js +27131 -0
  33. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.js.map +7 -0
  34. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.css +62 -0
  35. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.css.map +7 -0
  36. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.js +27168 -0
  37. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.js.map +7 -0
  38. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.css +62 -0
  39. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.css.map +7 -0
  40. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.js +28250 -0
  41. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.js.map +7 -0
  42. data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/application.js +2456 -0
  43. data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/application.js.map +7 -0
  44. data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/index.js +2453 -0
  45. data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/index.js.map +7 -0
  46. data/examples/ruby-on-rails-api/descope/app/assets/builds/reportWebVitals.js +211 -0
  47. data/examples/ruby-on-rails-api/descope/app/assets/builds/reportWebVitals.js.map +7 -0
  48. data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.css +62 -0
  49. data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.css.map +7 -0
  50. data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.js +27973 -0
  51. data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.js.map +7 -0
  52. data/examples/ruby-on-rails-api/descope/package-lock.json +7 -8
  53. data/examples/ruby-on-rails-api/descope/yarn.lock +3 -3
  54. data/lib/descope/api/v1/auth.rb +21 -6
  55. data/lib/descope/api/v1/management/access_key.rb +5 -4
  56. data/lib/descope/api/v1/management/common.rb +4 -1
  57. data/lib/descope/api/v1/management/role.rb +22 -6
  58. data/lib/descope/api/v1/management/user.rb +17 -0
  59. data/lib/descope/mixins/common.rb +2 -12
  60. data/lib/descope/mixins/http.rb +1 -1
  61. data/lib/descope/version.rb +1 -1
  62. data/spec/integration/lib.descope/api/v1/auth/enchantedlink_spec.rb +81 -0
  63. data/spec/integration/lib.descope/api/v1/auth/magiclink_spec.rb +49 -0
  64. data/spec/integration/lib.descope/api/v1/auth/otp_spec.rb +38 -0
  65. data/spec/integration/lib.descope/api/v1/auth/password_spec.rb +41 -0
  66. data/spec/integration/lib.descope/api/v1/auth/totp_spec.rb +76 -0
  67. data/spec/integration/lib.descope/api/v1/management/access_key_spec.rb +62 -0
  68. data/spec/integration/lib.descope/api/v1/management/audit_spec.rb +16 -0
  69. data/spec/integration/lib.descope/api/v1/management/authz_spec.rb +187 -0
  70. data/spec/integration/lib.descope/api/v1/management/flow_spec.rb +44 -0
  71. data/spec/integration/lib.descope/api/v1/management/permissions_spec.rb +27 -0
  72. data/spec/integration/lib.descope/api/v1/management/project_spec.rb +29 -0
  73. data/spec/integration/lib.descope/api/v1/management/roles_spec.rb +116 -0
  74. data/spec/integration/lib.descope/api/v1/management/user_spec.rb +262 -0
  75. data/spec/lib.descope/api/v1/auth_spec.rb +50 -1
  76. data/spec/lib.descope/api/v1/management/access_key_spec.rb +4 -2
  77. data/spec/lib.descope/api/v1/management/role_spec.rb +35 -6
  78. data/spec/lib.descope/api/v1/management/user_spec.rb +40 -0
  79. data/spec/spec_helper.rb +9 -38
  80. data/spec/support/client_config.rb +5 -1
  81. data/spec/support/dummy_class.rb +15 -1
  82. data/spec/support/utils.rb +1 -1
  83. metadata +56 -4
  84. data/examples/ruby-on-rails-api/descope/tmp/pids/.keep +0 -0
  85. data/examples/ruby-on-rails-api/descope/tmp/storage/.keep +0 -0
@@ -0,0 +1,62 @@
1
+ @import "https://fonts.googleapis.com/css2?family=Golos+Text:wght@500&display=swap";
2
+
3
+ /* app/javascript/App.css */
4
+ .page {
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ justify-content: center;
9
+ margin-bottom: 5vh;
10
+ }
11
+ .title {
12
+ margin-top: 10vh;
13
+ margin-bottom: 5vh;
14
+ font-size: 2em;
15
+ }
16
+ .link {
17
+ text-decoration: none;
18
+ margin-bottom: 5vh;
19
+ }
20
+ .btn {
21
+ border: None;
22
+ background-color: #00BD67;
23
+ padding: 15px 25px;
24
+ color: #fff;
25
+ font-size: 1.1em;
26
+ border-radius: 9px;
27
+ margin-top: 12px;
28
+ margin-right: 1vh;
29
+ }
30
+ .student {
31
+ margin-bottom: 5vh;
32
+ }
33
+ .students {
34
+ font-size: 1.5em;
35
+ }
36
+ body {
37
+ margin: 0;
38
+ font-family:
39
+ -apple-system,
40
+ BlinkMacSystemFont,
41
+ "Segoe UI",
42
+ "Roboto",
43
+ "Oxygen",
44
+ "Ubuntu",
45
+ "Cantarell",
46
+ "Fira Sans",
47
+ "Droid Sans",
48
+ "Helvetica Neue",
49
+ sans-serif;
50
+ -webkit-font-smoothing: antialiased;
51
+ -moz-osx-font-smoothing: grayscale;
52
+ }
53
+ code {
54
+ font-family:
55
+ source-code-pro,
56
+ Menlo,
57
+ Monaco,
58
+ Consolas,
59
+ "Courier New",
60
+ monospace;
61
+ }
62
+ /*# sourceMappingURL=/assets/components/Home.css.map */
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../javascript/App.css"],
4
+ "sourcesContent": ["@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@500&display=swap');\n\n.page {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n margin-bottom: 5vh;\n}\n\n.title {\n margin-top: 10vh;\n margin-bottom: 5vh;\n font-size: 2em;\n}\n\n.link {\n text-decoration: none;\n margin-bottom: 5vh;\n}\n\n.btn {\n border: None;\n background-color: #00BD67;\n padding: 15px 25px;\n color: #fff;\n font-size: 1.1em;\n border-radius: 9px;\n margin-top: 12px;\n margin-right: 1vh;\n}\n\n.student {\n margin-bottom: 5vh;\n}\n\n.students {\n font-size: 1.5em;\n}\n\nbody {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n"],
5
+ "mappings": ";;;AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,eAAa;AACb,mBAAiB;AACjB,iBAAe;AACjB;AAEA,CAAC;AACC,cAAY;AACZ,iBAAe;AACf,aAAW;AACb;AAEA,CAAC;AACC,mBAAiB;AACjB,iBAAe;AACjB;AAEA,CAAC;AACC,UAAQ;AACR,oBAAkB;AAClB,WAAS,KAAK;AACd,SAAO;AACP,aAAW;AACX,iBAAe;AACf,cAAY;AACZ,gBAAc;AAChB;AAEA,CAAC;AACC,iBAAe;AACjB;AAEA,CAAC;AACC,aAAW;AACb;AAEA;AACE,UAAQ;AACR;AAAA,IAAa,aAAa;AAAA,IAAE,kBAAkB;AAAA,IAAE,UAAU;AAAA,IAAE,QAAQ;AAAA,IAAE,QAAQ;AAAA,IAC9E,QAAQ;AAAA,IAAE,WAAW;AAAA,IAAE,WAAW;AAAA,IAAE,YAAY;AAAA,IAAE,gBAAgB;AAAA,IAClE;AACA,0BAAwB;AACxB,2BAAyB;AAC3B;AAEA;AACE;AAAA,IAAa,eAAe;AAAA,IAAE,KAAK;AAAA,IAAE,MAAM;AAAA,IAAE,QAAQ;AAAA,IAAE,aAAa;AAAA,IACpE;AACF;",
6
+ "names": []
7
+ }