@steedos/accounts 2.2.52-beta.7 → 2.2.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/LICENSE.txt +2 -5
  2. package/lib/core/index.js +34 -28
  3. package/lib/core/index.js.map +1 -1
  4. package/lib/database-mongo/mongo.js +105 -101
  5. package/lib/database-mongo/mongo.js.map +1 -1
  6. package/lib/index.js +10 -20
  7. package/lib/index.js.map +1 -1
  8. package/lib/mail.js +5 -5
  9. package/lib/mail.js.map +1 -1
  10. package/lib/password/accounts-password.js +54 -41
  11. package/lib/password/accounts-password.js.map +1 -1
  12. package/lib/password/index.js +1 -1
  13. package/lib/password/index.js.map +1 -1
  14. package/lib/password/utils/encryption.js +3 -3
  15. package/lib/rest-express/endpoints/authorize.js +2 -2
  16. package/lib/rest-express/endpoints/get-user.js +2 -2
  17. package/lib/rest-express/endpoints/impersonate.js +2 -2
  18. package/lib/rest-express/endpoints/initServer.js +2 -2
  19. package/lib/rest-express/endpoints/login.js +2 -2
  20. package/lib/rest-express/endpoints/logout.js +2 -2
  21. package/lib/rest-express/endpoints/oauth/provider-callback.js +3 -3
  22. package/lib/rest-express/endpoints/oauth/provider-callback.js.map +1 -1
  23. package/lib/rest-express/endpoints/password/change-password.js +2 -2
  24. package/lib/rest-express/endpoints/password/register.js +2 -2
  25. package/lib/rest-express/endpoints/password/reset.js +4 -4
  26. package/lib/rest-express/endpoints/password/two-factor.js +6 -6
  27. package/lib/rest-express/endpoints/password/verify-email.js +6 -6
  28. package/lib/rest-express/endpoints/password/verify.js +4 -4
  29. package/lib/rest-express/endpoints/put-user-name.js +2 -2
  30. package/lib/rest-express/endpoints/refresh-access-token.js +2 -2
  31. package/lib/rest-express/endpoints/service-authenticate.js +2 -2
  32. package/lib/rest-express/endpoints/spaces.js +2 -2
  33. package/lib/rest-express/endpoints/steedos/create-tenant.js +2 -2
  34. package/lib/rest-express/endpoints/steedos/get-tenant.js +2 -4
  35. package/lib/rest-express/endpoints/steedos/get-tenant.js.map +1 -1
  36. package/lib/rest-express/endpoints/steedos/settings.js +9 -4
  37. package/lib/rest-express/endpoints/steedos/settings.js.map +1 -1
  38. package/lib/rest-express/endpoints/update-session.js +2 -2
  39. package/lib/rest-express/express-middleware.js +1 -1
  40. package/lib/rest-express/express-middleware.js.map +1 -1
  41. package/lib/rest-express/user-loader.js +2 -2
  42. package/lib/rest-express/utils/steedos-auth.js +2 -2
  43. package/lib/rest-express/utils/steedos-auth.js.map +1 -1
  44. package/lib/rest-express/utils/users.js +4 -4
  45. package/lib/server/accounts-server.js +56 -30
  46. package/lib/server/accounts-server.js.map +1 -1
  47. package/lib/server/utils/email.js +2 -2
  48. package/lib/types/index.js +14 -14
  49. package/lib/types/index.js.map +1 -1
  50. package/package.json +14 -20
  51. package/src/core/index.ts +12 -5
  52. package/src/database-mongo/mongo.ts +29 -26
  53. package/src/index.ts +6 -16
  54. package/src/mail.ts +3 -3
  55. package/src/password/accounts-password.ts +17 -5
  56. package/src/rest-express/endpoints/steedos/get-tenant.ts +0 -2
  57. package/src/rest-express/endpoints/steedos/settings.ts +15 -1
  58. package/src/server/accounts-server.ts +26 -3
  59. package/src/server/types/jwt-data.ts +10 -1
  60. package/src/types/types/connection-informations.ts +9 -0
  61. package/lib/oauth2/client.js +0 -1
  62. package/lib/oauth2/client.js.map +0 -1
  63. package/lib/oauth2/config.js +0 -14
  64. package/lib/oauth2/config.js.map +0 -1
  65. package/lib/oauth2/consent.js +0 -192
  66. package/lib/oauth2/consent.js.map +0 -1
  67. package/lib/oauth2/login.js +0 -166
  68. package/lib/oauth2/login.js.map +0 -1
  69. package/lib/oauth2/logout.js +0 -60
  70. package/lib/oauth2/logout.js.map +0 -1
  71. package/lib/oauth2/stub/oidc-cert.js +0 -67
  72. package/lib/oauth2/stub/oidc-cert.js.map +0 -1
  73. package/lib/saml-idp/config.js +0 -82
  74. package/lib/saml-idp/config.js.map +0 -1
  75. package/lib/saml-idp/connectedApps.js +0 -20
  76. package/lib/saml-idp/connectedApps.js.map +0 -1
  77. package/lib/saml-idp/express-middleware.js +0 -684
  78. package/lib/saml-idp/express-middleware.js.map +0 -1
  79. package/lib/saml-idp/index.js +0 -13
  80. package/lib/saml-idp/index.js.map +0 -1
  81. package/lib/saml-idp/simpleProfileMapper.js +0 -75
  82. package/lib/saml-idp/simpleProfileMapper.js.map +0 -1
  83. package/src/oauth2/client.ts +0 -0
  84. package/src/oauth2/config.ts +0 -15
  85. package/src/oauth2/consent.ts +0 -208
  86. package/src/oauth2/login.ts +0 -179
  87. package/src/oauth2/logout.ts +0 -66
  88. package/src/oauth2/stub/oidc-cert.ts +0 -86
  89. package/src/saml-idp/config.js +0 -85
  90. package/src/saml-idp/connectedApps.ts +0 -16
  91. package/src/saml-idp/express-middleware.js +0 -811
  92. package/src/saml-idp/index.ts +0 -14
  93. package/src/saml-idp/simpleProfileMapper.js +0 -82
  94. package/src/saml-idp/views/error.hbs +0 -11
  95. package/src/saml-idp/views/layout.hbs +0 -72
  96. package/src/saml-idp/views/samlresponse.hbs +0 -20
  97. package/src/saml-idp/views/settings.hbs +0 -175
  98. package/src/saml-idp/views/user.hbs +0 -261
  99. package/views/oauth2/consent.pug +0 -141
@@ -1,141 +0,0 @@
1
- <!DOCTYPE html>
2
- html
3
- head
4
- meta(http-equiv="Content-Type", content="text/html; charset=utf-8")
5
- meta(http-equiv="Content-Language", content="zh-cn")
6
- meta(name="apple-mobile-web-app-capable", content="no")
7
- meta(name="apple-touch-fullscreen", content="yes")
8
- meta(name="format-detection", content="telephone=no,email=no")
9
- meta(name="apple-mobile-web-app-status-bar-style", content="white")
10
- meta(http-equiv="X-UA-Compatible", content="IE=Edge,chrome=1")
11
- meta(http-equiv="Expires", content="0")
12
- meta(http-equiv="Pragma", content="no-cache")
13
- meta(http-equiv="Cache-control", content="no-cache")
14
- meta(http-equiv="Cache", content="no-cache")
15
- meta(name="viewport", content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0")
16
- title Steedos OAuth2 Consent
17
- block css
18
- link(rel="stylesheet", href="/assets/styles/steedos-tailwind.min.css")
19
- style.
20
- .DashedConnection{
21
- margin-bottom: 0 !important;
22
- margin-right: auto !important;
23
- margin-left: auto !important;
24
- display: block !important;
25
- position: relative;
26
- //- width: 300px;
27
- }
28
- .DashedConnection::before {
29
- position: absolute;
30
- top: 50%;
31
- left: 0;
32
- width: 100%;
33
- content: "";
34
- border-bottom: 2px dashed #d0d7de;
35
- }
36
- .CircleBadge{
37
- display: flex;
38
- align-items: center;
39
- justify-content: center;
40
- border-radius: 50%;
41
- box-shadow: var(--color-shadow-medium);
42
- width: 96px;
43
- height: 96px;
44
- position: relative;
45
- background-color: #ffffff;
46
- }
47
- .position-relative {
48
- position: relative !important;
49
- }
50
- .color-bg-success-emphasis {
51
- background-color: #2da44e !important;
52
- }
53
- .text-center {
54
- text-align: center !important;
55
- }
56
- .flex-items-center {
57
- align-items: center !important;
58
- }
59
- .flex-justify-between {
60
- justify-content: space-between !important;
61
- }
62
- .color-fg-on-emphasis{
63
- color: #ffffff !important;
64
- }
65
- .octicon {
66
- display: inline-block;
67
- overflow: visible !important;
68
- vertical-align: text-bottom;
69
- fill: currentColor;
70
- }
71
- .title{
72
- margin-top: 0;
73
- margin-bottom: 24px !important;
74
- font-size: 24px !important;
75
- line-height: 1.25 !important;
76
- text-align: center !important;
77
- font-weight: 400 !important;
78
- }
79
- body{
80
- max-width: 530px;
81
- margin-right: auto !important;
82
- margin-left: auto !important;
83
- }
84
- .text-small {
85
- font-size: 12px !important;
86
- }
87
- body(class="antialiased font-sans bg-gray-200 overflow-hidden")
88
- .px-3.pt-4
89
- .DashedConnection.mb-0.mx-auto.d-none.d-md-block(class='w-64 md:w-96')
90
- .mt-5.flex.flex-justify-between.flex-items-center(class='sm:grid-cols-3')
91
- .CircleBadge.CircleBadge--medium(style='background-color:#ffffff')
92
- img.CircleBadge-icon(src=client.logo_uri height='50' width='50' alt='')
93
- .position-relative.color-bg-success-emphasis.text-center(style='border-radius: 50%; width:32px; height:32px;')
94
- svg.octicon.octicon-check.color-fg-on-emphasis.mt-2(aria-hidden='true' height='16' viewbox='0 0 16 16' version='1.1' width='16' data-view-component='true')
95
- path(fill-rule='evenodd' d='M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z')
96
- .CircleBadge.CircleBadge--medium.box-shadow-none(style='background-color: #fff; overflow: hidden;')
97
- img.CircleBadge-icon(src='/favicon.ico' height='50' width='50' alt='')
98
- h2.title 授权 #{client.client_name || client.client_id}
99
-
100
- .max-w-7xl.mx-auto.py-2.px-4(class='md:px-0')
101
- .max-w-2xl.mx-auto
102
- .bg-white.overflow-hidden.shadow.rounded-lg
103
- .px-4.py-5(class='sm:p-6')
104
- ul.mt-4(role='list')
105
- li.py-4.flex.items-center.justify-between.space-x-3
106
- .min-w-0.flex-1.flex.items-center.space-x-3
107
- .flex-shrink-0
108
- img.h-10.w-10.rounded-full(src='/images/default-avatar.png' alt='')
109
- .min-w-0.flex-1
110
- p.text-sm.font-medium.text-gray-900.truncate <strong>#{client.client_name || client.client_id}</strong>想访问您的<strong>#{userInfo.name}</strong>账户
111
- p.text-sm.font-medium.text-gray-500.truncate 此应用程序将能够读取您的个人基本信息
112
- .border-t.border-gray-200.px-4.py-4(class='sm:px-6')
113
- form(action=action, method="POST")
114
- input(type="hidden", name="challenge", value=challenge)
115
- input(type="hidden", name="_csrf", value=csrfToken)
116
- div(class='flex items-center justify-between')
117
-
118
- each scope in requested_scope
119
- div(class='flex items-center')
120
- input(type="checkbox", class="grant_scope h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded", id=scope, value=scope, name="grant_scope" checked="checked")
121
- if scope === 'profile'
122
- label(for=scope class='ml-2 block text-sm text-gray-900') 访问基本信息 (id, email, address, phone, locale)
123
- else if scope === 'profile'
124
- label(for=scope class='ml-2 block text-sm text-gray-900') 完全访问权限
125
- else if scope === 'openid'
126
- label(for=scope class='ml-2 block text-sm text-gray-900') 允许访问您的唯一标志符
127
- br
128
- .mt-5(class='sm:mt-6 sm:grid sm:grid-cols-2 sm:gap-3 sm:grid-flow-row-dense')
129
- button.w-full.inline-flex.justify-center.rounded-md.border.border-transparent.shadow-sm.px-4.py-2.bg-indigo-600.text-base.font-medium.text-white(type='submit' id="accept" name="submit" value="Allow access" class='hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:col-start-2 sm:text-sm')
130
- | 授权 #{client.client_name || client.client_id}
131
- button.mt-3.w-full.inline-flex.justify-center.rounded-md.border.border-gray-300.shadow-sm.px-4.py-2.bg-white.text-base.font-medium.text-gray-700(type='submit' id="reject" name="submit" value="Deny access" class='hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:col-start-1 sm:text-sm')
132
- | 取消
133
- if client.client_uri
134
- .col-sm-12.mt-2
135
- p.text-small.color-fg-muted.mb-0.text-center
136
- font(style='vertical-align: inherit;')
137
- font(style='vertical-align: inherit;') &#x6388;&#x6743;&#x5C06;&#x91CD;&#x5B9A;&#x5411;&#x5230;
138
- br
139
- strong.color-fg-default
140
- font(style='vertical-align: inherit;')
141
- font(style='vertical-align: inherit;font-weight: 400;color:#24292f') #{client.client_uri}