otp-policy.html 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
  2. <h1>{{:: 'authentication' | translate}}</h1>
  3. <kc-tabs-authentication></kc-tabs-authentication>
  4. <form class="form-horizontal" name="realmForm" novalidate kc-read-only="!access.manageRealm">
  5. <div class="form-group">
  6. <label for="type" class="col-md-2 control-label">{{:: 'otp-type' | translate}}</label>
  7. <div class="col-md-2">
  8. <div>
  9. <select id="type" ng-model="realm.otpPolicyType" class="form-control">
  10. <option value="totp">{{:: 'time-based' | translate}}</option>
  11. <option value="hotp">{{:: 'counter-based' | translate}}</option>
  12. </select>
  13. </div>
  14. </div>
  15. <kc-tooltip>{{:: 'otp-type.tooltip' | translate}}</kc-tooltip>
  16. </div>
  17. <div class="form-group">
  18. <label for="alg" class="col-md-2 control-label">{{:: 'otp-hash-algorithm' | translate}}</label>
  19. <div class="col-md-2">
  20. <div>
  21. <select id="alg" ng-model="realm.otpPolicyAlgorithm" class="form-control">
  22. <option value="HmacSHA1">SHA1</option>
  23. <option value="HmacSHA256">SHA256</option>
  24. <option value="HmacSHA512">SHA512</option>
  25. </select>
  26. </div>
  27. </div>
  28. <kc-tooltip>{{:: 'otp-hash-algorithm.tooltip' | translate}}</kc-tooltip>
  29. </div>
  30. <div class="form-group">
  31. <label class="col-md-2 control-label" for="digits">{{:: 'number-of-digits' | translate}}</label>
  32. <div class="col-md-2">
  33. <div>
  34. <select id="digits" ng-model="realm.otpPolicyDigits" class="form-control" ng-options="item as item for item in optionsDigits">
  35. </select>
  36. </div>
  37. </div>
  38. <kc-tooltip>{{:: 'otp.number-of-digits.tooltip' | translate}}</kc-tooltip>
  39. </div>
  40. <div class="form-group">
  41. <label class="col-md-2 control-label" for="lookAhead">{{:: 'look-ahead-window' | translate}}</label>
  42. <div class="col-md-6">
  43. <input class="form-control" type="number" required min="0" max="120" id="lookAhead" name="lookAhead" data-ng-model="realm.otpPolicyLookAheadWindow" autofocus>
  44. </div>
  45. <kc-tooltip>{{:: 'otp.look-ahead-window.tooltip' | translate}}</kc-tooltip>
  46. </div>
  47. <div class="form-group" data-ng-if="realm.otpPolicyType == 'hotp'">
  48. <label class="col-md-2 control-label" for="counter">{{:: 'initial-counter' | translate}}</label>
  49. <div class="col-md-6">
  50. <input class="form-control" type="number" data-ng-required="realm.otpPolicyType == 'hotp'" min="1" max="120" id="counter" name="counter" data-ng-model="realm.otpPolicyInitialCounter" autofocus>
  51. </div>
  52. <kc-tooltip>{{:: 'otp.initial-counter.tooltip' | translate}}</kc-tooltip>
  53. </div>
  54. <div class="form-group" data-ng-if="realm.otpPolicyType == 'totp'">
  55. <label class="col-md-2 control-label" for="counter">{{:: 'otp-token-period' | translate}}</label>
  56. <div class="col-md-6">
  57. <input class="form-control" type="number" data-ng-required="realm.otpPolicyType == 'totp'" min="1" max="120" id="period" name="period" data-ng-model="realm.otpPolicyPeriod">
  58. </div>
  59. <kc-tooltip>{{:: 'otp-token-period.tooltip' | translate}}</kc-tooltip>
  60. </div>
  61. <div class="form-group">
  62. <label class="col-md-2 control-label">{{:: 'otp-supported-applications' | translate}}</label>
  63. <div class="col-md-6">
  64. {{realm.otpSupportedApplications.join(', ')}}
  65. </div>
  66. <kc-tooltip>{{:: 'otp-supported-applications.tooltip' | translate}}</kc-tooltip>
  67. </div>
  68. <div class="form-group" data-ng-show="access.manageRealm">
  69. <div class="col-md-10 col-md-offset-2">
  70. <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button>
  71. <button kc-reset data-ng-disabled="!changed">{{:: 'cancel' | translate}}</button>
  72. </div>
  73. </div>
  74. </form>
  75. </div>
  76. <kc-menu></kc-menu>