text: (function () {
    'use strict';
  
    // PasswordValidator service used for testing the password strength
    angular
      .module('users.services')
      .factory('PasswordValidator', PasswordValidator);
  
    PasswordValidator.$inject = ['$window'];
  
    function PasswordValidator($window) {
      var owaspPasswordStrengthTest = $window.owaspPasswordStrengthTest;
  
      var service = {
        getResult: getResult,
        getPopoverMsg: getPopoverMsg
      };
  
      return service;
  
      function getResult(password) {
        var result = owaspPasswordStrengthTest.test(password);
        return result;
      }
  
      function getPopoverMsg() {
        var popoverMsg = '密码应该由10个或10个以上字符组成，且应该包含大小写字母数字以及特殊字符。';
  
        return popoverMsg;
      }
    }
  
  }());
  