appUpdate.ftl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <!DOCTYPE HTML>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <#include "../../layout/header.ftl"/>
  5. <#include "../../layout/common.cssjs.ftl"/>
  6. <#include "../appCommonHead.ftl"/>
  7. <#setting number_format="#">
  8. </head>
  9. <body>
  10. <div class="container">
  11. <div class="row">
  12. <div class="col-md-12">
  13. <form id="actionForm_app" method="post" type="label" autoclose="true" closeWindow="true"
  14. action="<@base/>/apps/oauth20/update"
  15. forward="<@base/>/apps/list"
  16. enctype="multipart/form-data"
  17. class="needs-validation" novalidate>
  18. <!-- content -->
  19. <!--table-->
  20. <table width="960px" class="table table-bordered" >
  21. <tbody>
  22. <tr>
  23. <td ><#include "../appUpdateCommon.ftl"/></td>
  24. </tr>
  25. <tr>
  26. <td>
  27. <table width="960px" class="table table-bordered" >
  28. <tbody>
  29. <tr>
  30. <td colspan=4><h5><@locale code="apps.oauth.v2.0.info" /></h5></td>
  31. </tr>
  32. <tr class="d-none">
  33. <th style="width:15%;"><@locale code="apps.oauth.v2.0.clientId" /></th>
  34. <td style="width:35%;">
  35. <span id="clientId_text">${model.clientId}</span>
  36. <input type="hidden" class="form-control" id="clientId" name="clientId" title="" value="${model.clientId}"/>
  37. </td>
  38. <th style="width:15%;"><@locale code="apps.oauth.v2.0.clientSecret" /></th>
  39. <td style="width:35%;">
  40. <span id="clientSecret_text">${model.clientSecret}</span>
  41. <input type="hidden" class="form-control" id="clientSecret" name="clientSecret" title="" value="${model.clientSecret}"/>
  42. </td>
  43. </tr>
  44. <tr>
  45. <th ><@locale code="apps.oauth.subject" /></th>
  46. <td >
  47. <select id="subject" name="subject" class="form-control form-select">
  48. <option value="userId" <#if 'userId'==model.subject>selected</#if> >
  49. <@locale code="userinfo.id"/></option>
  50. <option value="employeeNumber" <#if 'employeeNumber'==model.subject>selected</#if> >
  51. <@locale code="userinfo.employeeNumber"/></option>
  52. <option value="username" <#if 'username'==model.subject>selected</#if> >
  53. <@locale code="userinfo.username"/></option>
  54. <option value="email" <#if 'email'==model.subject>selected</#if> >
  55. <@locale code="userinfo.email"/></option>
  56. <option value="mobile" <#if 'mobile'==model.subject>selected</#if> >
  57. <@locale code="userinfo.mobile"/></option>
  58. <option value="windowsaccount" <#if 'windowsaccount'==model.subject>selected</#if> >
  59. <@locale code="userinfo.windowsAccount"/></option>
  60. </select>
  61. </td>
  62. <th style="width:15%;"><@locale code="apps.oauth.scope" /></th>
  63. <td >
  64. <table class="hidetable" style="width:100%;">
  65. <tr>
  66. <td>read<input type="checkbox" id="scope_trust" name="scope" value="read" <#if model.scope?contains("read") >checked</#if> /></td>
  67. <td>write<input type="checkbox" id="scope_write" name="scope" value="write" <#if model.scope?contains('write') >checked</#if>/></td>
  68. <td>trust<input type="checkbox" id="scope_trust" name="scope" value="trust" <#if model.scope?contains('trust') >checked</#if>/></td>
  69. <td>openid<input type="checkbox" id="scope_openid" name="scope" value="openid" <#if model.scope?contains('openid') >checked</#if>/></td>
  70. <td>profile<input type="checkbox" id="scope_profile" name="scope" value="profile" <#if model.scope?contains('profile') >checked</#if>/></td>
  71. <td>email<input type="checkbox" id="scope_email" name="scope" value="email" <#if model.scope?contains('email') >checked</#if>/></td>
  72. <td>phone<input type="checkbox" id="scope_phone" name="scope" value="phone" <#if model.scope?contains('phone') >checked</#if>/></td>
  73. <td>address<input type="checkbox" id="scope_address" name="scope" value="address" <#if model.scope?contains('address') >checked</#if>/></td>
  74. <td>all<input type="checkbox" id="scope_all" name="scope" value="all" <#if model.scope?contains('all') >checked</#if>/></td>
  75. <td><b class="orange"></b><label for="scope"></label></td>
  76. </tr>
  77. </table>
  78. </td>
  79. </tr>
  80. <tr>
  81. <th><@locale code="apps.oauth.GrantTypes" /></th>
  82. <td colspan="3">
  83. <table class="hidetable" style="width:100%;">
  84. <tr>
  85. <td>authorization_code | code<input <#if model.authorizedGrantTypes?contains('authorization_code') >checked</#if> type="checkbox" id="grantTypes_authorization_code" name="authorizedGrantTypes" value="authorization_code"/></td>
  86. <td>password<input <#if model.authorizedGrantTypes?contains('password') >checked</#if> type="checkbox" id="grantTypes_trust" name="authorizedGrantTypes" value="password"/></td>
  87. <td>implicit<input <#if model.authorizedGrantTypes?contains('implicit') >checked</#if> type="checkbox" id="grantTypes_implicit" name="authorizedGrantTypes" value="implicit"/></td>
  88. <td>client_credentials<input <#if model.authorizedGrantTypes?contains('client_credentials') >checked</#if> type="checkbox" id="grantTypes_client_credentials" name="authorizedGrantTypes" value="client_credentials"/></td>
  89. <td>refresh_token<input <#if model.authorizedGrantTypes?contains('refresh_token') >checked</#if> type="checkbox" id="grantTypes_refresh_token" name="authorizedGrantTypes" value="refresh_token"/></td>
  90. <td>id_token<input <#if model.authorizedGrantTypes?contains('id_token') >checked</#if> type="checkbox" id="grantTypes_id_token" name="authorizedGrantTypes" value="id_token"/></td>
  91. <td>token<input <#if model.authorizedGrantTypes?contains( 'token') >checked</#if> type="checkbox" id="grantTypes_token" name="authorizedGrantTypes" value="token"/></td>
  92. </tr>
  93. </table>
  94. </td>
  95. </tr>
  96. <tr>
  97. <th><@locale code="apps.oauth.registeredRedirectUris" /></th>
  98. <td colspan=3>
  99. <textarea class="form-control" id="registeredRedirectUris" name="registeredRedirectUris" rows="4" cols="60" required="" >${model.registeredRedirectUris}</textarea>
  100. </td>
  101. </tr>
  102. <tr>
  103. <th style="width:15%;">PKCE</th>
  104. <td style="width:35%;">
  105. <select id="pkce" name="pkce" class="form-control form-select">
  106. <option value="yes" <#if "yes"==model.pkce?default("yes") >selected</#if>>
  107. <@locale code="common.text.yes" /></option>
  108. <option value="no" <#if 'no'==model.pkce >selected</#if>>
  109. <@locale code="common.text.no" /></option>
  110. </select>
  111. </td>
  112. <th style="width:15%;"><@locale code="apps.oauth.approvalPrompt" /></th>
  113. <td style="width:35%;">
  114. <select id="approvalPrompt" name="approvalPrompt" class="form-control form-select">
  115. <option value="force" <#if ""==model.approvalPrompt?default("") >selected</#if>>
  116. <@locale code="apps.oauth.approvalPrompt.force" /></option>
  117. <option value="auto" <#if 'auto'==model.approvalPrompt >selected</#if>>
  118. <@locale code="apps.oauth.approvalPrompt.auto" /></option>
  119. </select>
  120. </td>
  121. </tr>
  122. <tr>
  123. <th><@locale code="apps.oauth.accessTokenValiditySeconds" /></th>
  124. <td >
  125. <div class="input-group">
  126. <input type="text" class="form-control" id="accessTokenValiditySeconds" name="accessTokenValiditySeconds" title="" value="${model.accessTokenValiditySeconds}"/>
  127. <span class="input-group-text">Seconds</span>
  128. </div>
  129. </td>
  130. <th><@locale code="apps.oauth.refreshTokenValiditySeconds" /></th>
  131. <td>
  132. <div class="input-group">
  133. <input type="text" class="form-control" id="refreshTokenValiditySeconds" name="refreshTokenValiditySeconds" title="" value="${model.refreshTokenValiditySeconds}"/>
  134. <span class="input-group-text">Seconds</span>
  135. </div>
  136. </td>
  137. </tr>
  138. <tr>
  139. <td colspan=4><h5><@locale code="apps.oauth.connect.info" /></h5></td>
  140. </tr>
  141. <tr>
  142. <th ><@locale code="apps.oauth.connect.issuer" /></th>
  143. <td >
  144. <input type="text" class="form-control" id="issuer" name="issuer" title="" value="${model.issuer!}" />
  145. </td>
  146. <th ><@locale code="apps.oauth.connect.audience" /></th>
  147. <td >
  148. <input type="text" class="form-control" id="audience" name="audience" title="" value="${model.audience!}" />
  149. </td>
  150. </tr>
  151. <tr>
  152. <th ><@locale code="apps.oauth.connect.signature" /></th>
  153. <td >
  154. <select id="signature" name="signature" class="form-control form-select">
  155. <option value="NONE" <#if 'NONE'==model.signature> selected</#if> >NONE</option>
  156. <option value="RS256" <#if 'RS256'==model.signature>selected</#if> >RS256</option>
  157. <option value="RS384" <#if 'RS384'==model.signature>selected</#if> >RS384</option>
  158. <option value="RS512" <#if 'RS512'==model.signature>selected</#if> >RS512</option>
  159. <option value="HS256" <#if 'HS256'==model.signature>selected</#if> >HS256</option>
  160. <option value="HS384" <#if 'HS384'==model.signature>selected</#if> >HS384</option>
  161. <option value="HS512" <#if 'HS512'==model.signature>selected</#if> >HS512</option>
  162. </select>
  163. </td>
  164. <th><@locale code="apps.oauth.connect.userInfoResponse" /></th>
  165. <td>
  166. <select id="userInfoResponse" name="userInfoResponse" class="form-control form-select">
  167. <option value="NORMAL" <#if 'NORMAL'==model.userInfoResponse> selected</#if> >NORMAL</option>
  168. <option value="SIGNING" <#if 'SIGNING'==model.userInfoResponse> selected</#if> >SIGNING</option>
  169. <option value="ENCRYPTION" <#if 'ENCRYPTION'==model.userInfoResponse> selected</#if> >ENCRYPTION</option>
  170. <option value="SIGNING_ENCRYPTION" <#if 'SIGNING_ENCRYPTION'==model.userInfoResponse> selected</#if> >SIGNING_ENCRYPTION</option>
  171. </select>
  172. </td>
  173. </tr>
  174. <tr>
  175. <th ><@locale code="apps.oauth.connect.signatureKey" /></th>
  176. <td colspan ="3">
  177. <textarea class="form-control" id="signatureKey" name="signatureKey">${model.signatureKey!}</textarea>
  178. </td>
  179. </tr>
  180. <tr>
  181. <th style="width:15%;"><@locale code="apps.oauth.connect.algorithm" /></th>
  182. <td style="width:35%;">
  183. <select id="algorithm" name="algorithm" class="form-control form-select" >
  184. <option value="NONE" <#if 'NONE'==model.algorithm>selected</#if> >NONE</option>
  185. <option value="RSA1_5" <#if 'RSA1_5'==model.algorithm>selected</#if> >RSA1_5</option>
  186. <option value="RSA_OAEP" <#if 'RSA_OAEP'==model.algorithm>selected</#if>>RSA_OAEP</option>
  187. <option value="RSA-OAEP-256" <#if 'RSA-OAEP-256'==model.algorithm>selected</#if>>RSA-OAEP-256</option>
  188. <option value="A128KW" <#if 'A128KW'==model.algorithm>selected</#if>>A128KW</option>
  189. <option value="A192KW" <#if 'A192KW'==model.algorithm>selected</#if>>A192KW</option>
  190. <option value="A256KW" <#if 'A256KW'==model.algorithm>selected</#if>>A256KW</option>
  191. <option value="A128GCMKW" <#if 'A128GCMKW'==model.algorithm>selected</#if>>A128GCMKW</option>
  192. <option value="A192GCMKW" <#if 'A192GCMKW'==model.algorithm>selected</#if>>A192GCMKW</option>
  193. <option value="A256GCMKW" <#if 'A256GCMKW'==model.algorithm>selected</#if>>A256GCMKW</option>
  194. </select>
  195. </td>
  196. <th width="140px"><@locale code="apps.oauth.connect.encryptionMethod" /></th>
  197. <td width="340px">
  198. <select id="encryptionMethod" name="encryptionMethod" class="form-control form-select">
  199. <option value="A128GCM" <#if 'A128GCM'==model.encryptionMethod>selected</#if> >A128GCM</option>
  200. <option value="A192GCM" <#if 'A192GCM'==model.encryptionMethod>selected</#if> >A192GCM</option>
  201. <option value="A256GCM" <#if 'A256GCM'==model.encryptionMethod>selected</#if> >A256GCM</option>
  202. <option value="A128CBC-HS256" <#if 'A128CBC-HS256'==model.encryptionMethod>selected</#if> >A128CBC-HS256</option>
  203. <option value="A192CBC-HS384" <#if 'A192CBC-HS384'==model.encryptionMethod>selected</#if> >A192CBC-HS384</option>
  204. <option value="A256CBC-HS512" <#if 'A256CBC-HS512'==model.encryptionMethod>selected</#if> >A256CBC-HS512</option>
  205. <option value="XC20P" <#if 'XC20P'==model.encryptionMethod>selected</#if> >XC20P</option>
  206. </select>
  207. </td>
  208. </tr>
  209. <tr>
  210. <th ><@locale code="apps.oauth.connect.algorithmKey" /></th>
  211. <td colspan ="3">
  212. <textarea class="form-control" id="algorithmKey" name="algorithmKey">${model.algorithmKey!}</textarea>
  213. </td>
  214. </tr>
  215. </tbody>
  216. </table>
  217. </td>
  218. </tr>
  219. </tbody>
  220. </table>
  221. <input class="button btn btn-primary mr-3" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
  222. <input class="button btn btn-secondary mr-3" id="backBtn" type="button" value="<@locale code="button.text.close" />"/>
  223. </form>
  224. </div>
  225. </div>
  226. </div>
  227. </body>
  228. </html>