ge-admin-auth.js 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011
  1. import { InjectionToken, Injectable, Optional, Inject, Component, ChangeDetectionStrategy, ChangeDetectorRef, NgModule } from '@angular/core';
  2. import { CommonModule } from '@angular/common';
  3. import { Router, ActivatedRoute, RouterModule } from '@angular/router';
  4. import { NbAuthService, NB_AUTH_OPTIONS, NbAuthStrategyOptions, NbAuthResult, NbAuthIllegalTokenError, NbAuthStrategy, getDeepFromObject as getDeepFromObject$1 } from '@nebular/auth';
  5. import { TranslateService, TranslateModule } from '@ngx-translate/core';
  6. import { __values, __extends } from 'tslib';
  7. import { NbLayoutModule, NbCardModule, NbCheckboxModule, NbAlertModule, NbInputModule, NbButtonModule } from '@nebular/theme';
  8. import { FormsModule } from '@angular/forms';
  9. import { of, Subject } from 'rxjs';
  10. import { map, catchError, concatAll, switchMap } from 'rxjs/operators';
  11. import { HttpErrorResponse, HttpClient } from '@angular/common/http';
  12. import { JSEncrypt } from 'jsencrypt';
  13. /**
  14. * @fileoverview added by tsickle
  15. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  16. */
  17. /** @type {?} */
  18. var lang = {
  19. '与第一次输入不符合': '与第一次输入不符合.',
  20. '修改密码': '修改密码',
  21. '密码': '密码',
  22. '密码:': '密码:',
  23. '密码是必填的': '密码是必填的',
  24. '密码规则提示': '密码应该包含 最小长度 {{minLength}} 最大长度 {{maxLength}} 个字符',
  25. '您好,欢迎使用': '您好,欢迎使用',
  26. '成功!': '成功!',
  27. '新密码': '新密码',
  28. '新密码:': '新密码:',
  29. '新密码是必填的!': '新密码是必填的!',
  30. '旧密码:': '旧密码:',
  31. '旧密码是必填的!': '旧密码是必填的',
  32. '登出提示': '正在登出, 请等待...',
  33. '登录': '登录',
  34. '确认密码': '确认密码',
  35. '确认密码:': '确认密码:',
  36. '确认密码是必填的!': '确认密码是必填的!',
  37. '请设置您的新密码': '请设置您的新密码',
  38. '账户': '账户',
  39. '账户:': '账户:',
  40. '账户是必填的': '账户是必填的',
  41. '错误!': '错误!'
  42. };
  43. /**
  44. * @fileoverview added by tsickle
  45. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  46. */
  47. /** @type {?} */
  48. var lang$1 = {
  49. '与第一次输入不符合': '與第一次輸入不符合.',
  50. '修改密码': '更改密碼',
  51. '密码': '密碼',
  52. '密码:': '密碼:',
  53. '密码是必填的': '必須填寫密碼',
  54. '密码规则提示': '密碼應該包含 最小長度 {{minLength}} 最大長度 {{maxLength}} 個字符',
  55. '您好,欢迎使用': '您好,歡迎使用',
  56. '成功!': '成功!',
  57. '新密码': '新密碼',
  58. '新密码:': '新密碼:',
  59. '新密码是必填的!': '必須填寫新密碼',
  60. '旧密码:': '舊密碼:',
  61. '旧密码是必填的!': '必須填寫舊密碼',
  62. '登出提示': '正在登出, 請稍候⋯',
  63. '登录': '登入',
  64. '确认密码': '確認密碼',
  65. '确认密码:': '確認密碼:',
  66. '确认密码是必填的!': '必須填寫確認密碼',
  67. '请设置您的新密码': '請設置您的新密碼',
  68. '账户': '賬戶',
  69. '账户:': '賬戶:',
  70. '账户是必填的': '必須填寫賬戶',
  71. '错误!': '錯誤!'
  72. };
  73. /**
  74. * @fileoverview added by tsickle
  75. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  76. */
  77. /** @type {?} */
  78. var AUTH_DEFAULT_LANG = new InjectionToken('AUTH_DEFAULT_LANG');
  79. var LoginLangService = /** @class */ (function () {
  80. function LoginLangService(_translate, lang$2) {
  81. this._translate = _translate;
  82. this._translate.setTranslation('zh-cn', lang);
  83. this._translate.setTranslation('zh-hk', lang$1);
  84. this._translate.setDefaultLang(lang$2 ? lang$2 : 'zh-cn');
  85. this._translate.use(lang$2 ? lang$2 : 'zh-cn');
  86. }
  87. /**
  88. * @param {?=} lang
  89. * @return {?}
  90. */
  91. LoginLangService.prototype.setTranslate = /**
  92. * @param {?=} lang
  93. * @return {?}
  94. */
  95. function (lang) {
  96. this._translate.use(lang);
  97. };
  98. LoginLangService.decorators = [
  99. { type: Injectable }
  100. ];
  101. /** @nocollapse */
  102. LoginLangService.ctorParameters = function () { return [
  103. { type: TranslateService },
  104. { type: String, decorators: [{ type: Optional }, { type: Inject, args: [AUTH_DEFAULT_LANG,] }] }
  105. ]; };
  106. return LoginLangService;
  107. }());
  108. /**
  109. * @fileoverview added by tsickle
  110. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  111. */
  112. // getDeepFromObject({result: {data: 1}}, 'result.data', 2); // returns 1
  113. /**
  114. * @param {?=} object
  115. * @param {?=} name
  116. * @param {?=} defaultValue
  117. * @return {?}
  118. */
  119. function getDeepFromObject(object, name, defaultValue) {
  120. var e_1, _a;
  121. if (object === void 0) { object = {}; }
  122. /** @type {?} */
  123. var keys = name.split('.');
  124. // clone the object
  125. /** @type {?} */
  126. var currentValue = object;
  127. try {
  128. for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {
  129. var key = keys_1_1.value;
  130. if (currentValue) {
  131. currentValue = currentValue[key];
  132. }
  133. else {
  134. break;
  135. }
  136. }
  137. }
  138. catch (e_1_1) { e_1 = { error: e_1_1 }; }
  139. finally {
  140. try {
  141. if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1);
  142. }
  143. finally { if (e_1) throw e_1.error; }
  144. }
  145. return typeof currentValue === 'undefined' ? defaultValue : currentValue;
  146. }
  147. /**
  148. * @fileoverview added by tsickle
  149. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  150. */
  151. var LoginComponent = /** @class */ (function () {
  152. function LoginComponent(service, langService, options, cd, router) {
  153. if (options === void 0) { options = {}; }
  154. this.service = service;
  155. this.langService = langService;
  156. this.options = options;
  157. this.cd = cd;
  158. this.router = router;
  159. this.redirectDelay = 0;
  160. this.showMessages = {};
  161. this.strategy = '';
  162. this.errors = [];
  163. this.messages = [];
  164. this.user = {};
  165. this.submitted = false;
  166. this.socialLinks = [];
  167. this.rememberMe = false;
  168. this.redirectDelay = this.getConfigValue('forms.login.redirectDelay');
  169. this.showMessages = this.getConfigValue('forms.login.showMessages');
  170. this.strategy = this.getConfigValue('forms.login.strategy');
  171. this.socialLinks = this.getConfigValue('forms.login.socialLinks');
  172. this.rememberMe = this.getConfigValue('forms.login.rememberMe');
  173. }
  174. /**
  175. * @return {?}
  176. */
  177. LoginComponent.prototype.login = /**
  178. * @return {?}
  179. */
  180. function () {
  181. var _this = this;
  182. this.errors = [];
  183. this.messages = [];
  184. this.submitted = true;
  185. this.service.authenticate(this.strategy, this.user).subscribe((/**
  186. * @param {?} result
  187. * @return {?}
  188. */
  189. function (result) {
  190. _this.submitted = false;
  191. if (result.isSuccess()) {
  192. _this.messages = result.getMessages();
  193. }
  194. else {
  195. _this.errors = result.getErrors();
  196. }
  197. /** @type {?} */
  198. var redirect = result.getRedirect();
  199. if (redirect) {
  200. setTimeout((/**
  201. * @return {?}
  202. */
  203. function () {
  204. return _this.router.navigateByUrl(redirect);
  205. }), _this.redirectDelay);
  206. }
  207. _this.cd.detectChanges();
  208. }));
  209. };
  210. /**
  211. * @param {?} key
  212. * @return {?}
  213. */
  214. LoginComponent.prototype.getConfigValue = /**
  215. * @param {?} key
  216. * @return {?}
  217. */
  218. function (key) {
  219. return getDeepFromObject(this.options, key, null);
  220. };
  221. LoginComponent.decorators = [
  222. { type: Component, args: [{
  223. selector: 'auth-login',
  224. template: "<h1 id=\"title\" class=\"title\" translate>\u767B\u5F55</h1>\r\n<p class=\"sub-title\" translate>\u60A8\u597D,\u6B22\u8FCE\u4F7F\u7528</p>\r\n\r\n<nb-alert *ngIf=\"showMessages.error && errors?.length && !submitted\" outline=\"danger\" role=\"alert\">\r\n <p class=\"alert-title\"><b translate>\u9519\u8BEF!</b></p>\r\n <ul class=\"alert-message-list\">\r\n <li *ngFor=\"let error of errors\" class=\"alert-message\">{{ error }}</li>\r\n </ul>\r\n</nb-alert>\r\n\r\n<nb-alert\r\n *ngIf=\"showMessages.success && messages?.length && !submitted\"\r\n outline=\"success\"\r\n role=\"alert\"\r\n>\r\n <p class=\"alert-title\"><b translate>\u6210\u529F!</b></p>\r\n <ul class=\"alert-message-list\">\r\n <li *ngFor=\"let message of messages\" class=\"alert-message\">{{ message }}</li>\r\n </ul>\r\n</nb-alert>\r\n\r\n<form (ngSubmit)=\"login()\" #form=\"ngForm\" aria-labelledby=\"title\">\r\n <div class=\"form-control-group\">\r\n <label class=\"label\" for=\"input-email\" translate>\u8D26\u6237:</label>\r\n <input\r\n nbInput\r\n fullWidth\r\n [(ngModel)]=\"user.loginId\"\r\n #loginId=\"ngModel\"\r\n name=\"loginId\"\r\n id=\"input-loginId\"\r\n placeholder=\"{{ '\u8D26\u6237' | translate }}\"\r\n autofocus\r\n [status]=\"loginId.dirty ? (loginId.invalid ? 'danger' : 'success') : ''\"\r\n [required]=\"true\"\r\n [attr.aria-invalid]=\"loginId.invalid && loginId.touched ? true : null\"\r\n />\r\n <ng-container *ngIf=\"loginId.invalid && loginId.touched\">\r\n <p class=\"error-message\" *ngIf=\"loginId.errors?.required\" translate=\"\u8D26\u6237\u662F\u5FC5\u586B\u7684\">\r\n\r\n </p>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"form-control-group\">\r\n <label class=\"label\" for=\"input-password\" translate>\u5BC6\u7801:</label>\r\n <input\r\n nbInput\r\n fullWidth\r\n [(ngModel)]=\"user.loginPassword\"\r\n #password=\"ngModel\"\r\n name=\"password\"\r\n type=\"password\"\r\n id=\"input-password\"\r\n placeholder=\"{{'\u5BC6\u7801'|translate}}\"\r\n [status]=\"password.dirty ? (password.invalid ? 'danger' : 'success') : ''\"\r\n [required]=\"true\"\r\n [minlength]=\"getConfigValue('forms.validation.password.minLength')\"\r\n [maxlength]=\"getConfigValue('forms.validation.password.maxLength')\"\r\n [attr.aria-invalid]=\"password.invalid && password.touched ? true : null\"\r\n />\r\n <ng-container *ngIf=\"password.invalid && password.touched\">\r\n <p class=\"error-message\" *ngIf=\"password.errors?.required\" translate=\"\u5BC6\u7801\u662F\u5FC5\u586B\u7684\">\r\n\r\n </p>\r\n <p class=\"error-message\" *ngIf=\"password.errors?.minlength || password.errors?.maxlength\"\r\n translate=\"\u5BC6\u7801\u89C4\u5219\u63D0\u793A\" [translateParams]=\"{minLength: getConfigValue('forms.validation.password.minLength'), maxLength:getConfigValue('forms.validation.password.maxLength')}\"\r\n >\r\n \u5BC6\u7801\u5E94\u8BE5\u5305\u542B \u6700\u5C0F\u957F\u5EA6 {{ getConfigValue('forms.validation.password.minLength') }} \u6700\u5927\u957F\u5EA6\r\n {{ getConfigValue('forms.validation.password.maxLength') }}\r\n \u4E2A\u5B57\u7B26\r\n </p>\r\n </ng-container>\r\n </div>\r\n\r\n <!--<div class=\"form-control-group accept-group\">-->\r\n <!--<nb-checkbox name=\"rememberMe\" [(ngModel)]=\"user.rememberMe\" *ngIf=\"rememberMe\">\u8BB0\u4F4F\u8D26\u53F7</nb-checkbox>-->\r\n <!--&lt;!&ndash;<a class=\"forgot-password\" routerLink=\"../request-password\">Forgot Password?</a>&ndash;&gt;-->\r\n <!--</div>-->\r\n\r\n <button\r\n nbButton\r\n fullWidth\r\n status=\"success\"\r\n [disabled]=\"submitted || !form.valid\"\r\n [class.btn-pulse]=\"submitted\"\r\n translate=\"\u767B\u5F55\"\r\n >\r\n </button>\r\n</form>\r\n\r\n<!--<section *ngIf=\"socialLinks && socialLinks.length > 0\" class=\"links\" aria-label=\"Social sign in\">-->\r\n<!--or enter with:-->\r\n<!--<div class=\"socials\">-->\r\n<!--<ng-container *ngFor=\"let socialLink of socialLinks\">-->\r\n<!--<a *ngIf=\"socialLink.link\"-->\r\n<!--[routerLink]=\"socialLink.link\"-->\r\n<!--[attr.target]=\"socialLink.target\"-->\r\n<!--[attr.class]=\"socialLink.icon\"-->\r\n<!--[class.with-icon]=\"socialLink.icon\">{{ socialLink.title }}</a>-->\r\n<!--<a *ngIf=\"socialLink.url\"-->\r\n<!--[attr.href]=\"socialLink.url\"-->\r\n<!--[attr.target]=\"socialLink.target\"-->\r\n<!--[attr.class]=\"socialLink.icon\"-->\r\n<!--[class.with-icon]=\"socialLink.icon\">{{ socialLink.title }}</a>-->\r\n<!--</ng-container>-->\r\n<!--</div>-->\r\n<!--</section>-->\r\n\r\n<!--<section class=\"another-action\" aria-label=\"Register\">-->\r\n<!--Don't have an account? <a class=\"text-link\" routerLink=\"../register\">Register</a>-->\r\n<!--</section>-->\r\n",
  225. changeDetection: ChangeDetectionStrategy.OnPush
  226. }] }
  227. ];
  228. /** @nocollapse */
  229. LoginComponent.ctorParameters = function () { return [
  230. { type: NbAuthService },
  231. { type: LoginLangService },
  232. { type: undefined, decorators: [{ type: Inject, args: [NB_AUTH_OPTIONS,] }] },
  233. { type: ChangeDetectorRef },
  234. { type: Router }
  235. ]; };
  236. return LoginComponent;
  237. }());
  238. /**
  239. * @fileoverview added by tsickle
  240. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  241. */
  242. var NamePasswordAuthStrategyOptions = /** @class */ (function (_super) {
  243. __extends(NamePasswordAuthStrategyOptions, _super);
  244. function NamePasswordAuthStrategyOptions() {
  245. var _this = _super !== null && _super.apply(this, arguments) || this;
  246. _this.baseEndpoint = '/api/auth/';
  247. _this.getPublicKey = {
  248. endpoint: 'getPublicKey',
  249. method: 'get'
  250. };
  251. _this.login = {
  252. alwaysFail: false,
  253. endpoint: 'login',
  254. method: 'post',
  255. redirect: {
  256. success: '/',
  257. failure: null
  258. },
  259. defaultErrors: ['未知错误!'],
  260. defaultMessages: ['You have been successfully logged in.']
  261. };
  262. _this.createUser = {
  263. endpoint: 'createUser',
  264. method: 'post',
  265. defaultErrors: ['未知错误!']
  266. };
  267. _this.updatePasswordForAdmin = {
  268. endpoint: 'updatePasswordForAdmin',
  269. method: 'patch',
  270. defaultErrors: ['未知错误!']
  271. };
  272. _this.register = {
  273. alwaysFail: false,
  274. endpoint: 'register',
  275. method: 'post',
  276. redirect: {
  277. success: '/',
  278. failure: null
  279. },
  280. defaultErrors: ['Something went wrong, please try again.'],
  281. defaultMessages: ['You have been successfully registered.']
  282. };
  283. _this.requestPass = {
  284. endpoint: 'request-pass',
  285. method: 'post',
  286. redirect: {
  287. success: '/',
  288. failure: null
  289. },
  290. defaultErrors: ['Something went wrong, please try again.'],
  291. defaultMessages: ['Reset password instructions have been sent to your email.']
  292. };
  293. _this.resetPass = {
  294. endpoint: 'updateUserPassword',
  295. method: 'patch',
  296. redirect: {
  297. success: '/',
  298. failure: null
  299. },
  300. defaultErrors: ['未知错误.'],
  301. defaultMessages: ['Your password has been successfully changed.']
  302. };
  303. _this.logout = {
  304. alwaysFail: false,
  305. endpoint: 'logout',
  306. method: 'delete',
  307. redirect: {
  308. success: '/',
  309. failure: null
  310. },
  311. defaultErrors: ['Something went wrong, please try again.'],
  312. defaultMessages: ['You have been successfully logged out.']
  313. };
  314. _this.errors = {
  315. key: 'messager',
  316. getter: (/**
  317. * @param {?} module
  318. * @param {?} res
  319. * @param {?} options
  320. * @return {?}
  321. */
  322. function (module, res, options) { return [
  323. getDeepFromObject(res.error, options.errors.key, options[module].defaultErrors)
  324. ]; })
  325. };
  326. _this.messages = {
  327. key: 'messager',
  328. getter: (/**
  329. * @param {?} module
  330. * @param {?} res
  331. * @param {?} options
  332. * @return {?}
  333. */
  334. function (module, res, options) { return [getDeepFromObject(res.body, options.messages.key, false)]; })
  335. };
  336. _this.success = {
  337. key: 'success',
  338. getter: (/**
  339. * @param {?} module
  340. * @param {?} res
  341. * @param {?} options
  342. * @return {?}
  343. */
  344. function (module, res, options) {
  345. return getDeepFromObject(res.body, options.success.key, options[module].defaultMessages);
  346. })
  347. };
  348. return _this;
  349. }
  350. return NamePasswordAuthStrategyOptions;
  351. }(NbAuthStrategyOptions));
  352. /** @type {?} */
  353. var namePasswordStrategyOptions = new NamePasswordAuthStrategyOptions();
  354. /**
  355. * @fileoverview added by tsickle
  356. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  357. */
  358. var ResultError = /** @class */ (function () {
  359. function ResultError(message) {
  360. this.message = message;
  361. }
  362. return ResultError;
  363. }());
  364. var NamePasswordStrategyService = /** @class */ (function (_super) {
  365. __extends(NamePasswordStrategyService, _super);
  366. function NamePasswordStrategyService(http, route) {
  367. var _this = _super.call(this) || this;
  368. _this.http = http;
  369. _this.route = route;
  370. _this.defaultOptions = namePasswordStrategyOptions;
  371. return _this;
  372. }
  373. /**
  374. * @param {?} options
  375. * @return {?}
  376. */
  377. NamePasswordStrategyService.setup = /**
  378. * @param {?} options
  379. * @return {?}
  380. */
  381. function (options) {
  382. return [NamePasswordStrategyService, options];
  383. };
  384. /**
  385. * @param {?=} data
  386. * @return {?}
  387. */
  388. NamePasswordStrategyService.prototype.authenticate = /**
  389. * @param {?=} data
  390. * @return {?}
  391. */
  392. function (data) {
  393. var _this = this;
  394. /** @type {?} */
  395. var module = 'login';
  396. /** @type {?} */
  397. var method = this.getOption(module + ".method");
  398. /** @type {?} */
  399. var url = this.getActionEndpoint(module);
  400. /** @type {?} */
  401. var requireValidToken = this.getOption(module + ".requireValidToken");
  402. return this.getEncryptPassword(data.loginPassword).pipe(map((/**
  403. * @param {?} body
  404. * @return {?}
  405. */
  406. function (body) {
  407. body.loginID = data.loginId;
  408. return _this.http.request(method, url, { body: body, observe: 'response' })
  409. .pipe(map((/**
  410. * @param {?} res
  411. * @return {?}
  412. */
  413. function (res) {
  414. if (_this.getOption(module + ".alwaysFail")) {
  415. throw _this.createFailResponse(data);
  416. }
  417. else if (!_this.getOption('success.getter')(module, res, _this.options)) {
  418. throw new ResultError(_this.getOption('messages.getter')(module, res, _this.options));
  419. }
  420. return res;
  421. })), map((/**
  422. * @param {?} res
  423. * @return {?}
  424. */
  425. function (res) {
  426. return new NbAuthResult(true, res, _this.getOption(module + ".redirect.success"), [], _this.getOption('messages.getter')(module, res, _this.options));
  427. })), catchError((/**
  428. * @param {?} res
  429. * @return {?}
  430. */
  431. function (res) {
  432. return _this.handleResponseError(res, module);
  433. })));
  434. })), concatAll());
  435. };
  436. /**
  437. * @return {?}
  438. */
  439. NamePasswordStrategyService.prototype.logout = /**
  440. * @return {?}
  441. */
  442. function () {
  443. var _this = this;
  444. /** @type {?} */
  445. var module = 'logout';
  446. /** @type {?} */
  447. var method = this.getOption(module + ".method");
  448. /** @type {?} */
  449. var url = this.getActionEndpoint(module);
  450. return of({})
  451. .pipe(switchMap((/**
  452. * @param {?} res
  453. * @return {?}
  454. */
  455. function (res) {
  456. if (!url) {
  457. return of(res);
  458. }
  459. return _this.http.request(method, url, { observe: 'response' });
  460. })), map((/**
  461. * @param {?} res
  462. * @return {?}
  463. */
  464. function (res) {
  465. if (_this.getOption(module + ".alwaysFail")) {
  466. throw _this.createFailResponse();
  467. }
  468. return res;
  469. })), map((/**
  470. * @param {?} res
  471. * @return {?}
  472. */
  473. function (res) {
  474. return new NbAuthResult(true, res, _this.getOption(module + ".redirect.success"), [], _this.getOption('messages.getter')(module, res, _this.options));
  475. })), catchError((/**
  476. * @param {?} res
  477. * @return {?}
  478. */
  479. function (res) {
  480. return _this.handleResponseError(res, module);
  481. })));
  482. };
  483. /**
  484. * @param {?=} data
  485. * @return {?}
  486. */
  487. NamePasswordStrategyService.prototype.refreshToken = /**
  488. * @param {?=} data
  489. * @return {?}
  490. */
  491. function (data) {
  492. return undefined;
  493. };
  494. /**
  495. * @param {?=} data
  496. * @return {?}
  497. */
  498. NamePasswordStrategyService.prototype.register = /**
  499. * @param {?=} data
  500. * @return {?}
  501. */
  502. function (data) {
  503. return undefined;
  504. };
  505. /**
  506. * @param {?=} data
  507. * @return {?}
  508. */
  509. NamePasswordStrategyService.prototype.requestPassword = /**
  510. * @param {?=} data
  511. * @return {?}
  512. */
  513. function (data) {
  514. return undefined;
  515. };
  516. /**
  517. * @param {?=} data
  518. * @return {?}
  519. */
  520. NamePasswordStrategyService.prototype.resetPassword = /**
  521. * @param {?=} data
  522. * @return {?}
  523. */
  524. function (data) {
  525. var _this = this;
  526. /** @type {?} */
  527. var module = 'resetPass';
  528. /** @type {?} */
  529. var method = this.getOption(module + ".method");
  530. /** @type {?} */
  531. var url = this.getActionEndpoint(module);
  532. return this.getEncryptPassword(data.loginPasswordNew + '-' + data.loginPasswordOld).pipe(map((/**
  533. * @param {?} body
  534. * @return {?}
  535. */
  536. function (body) {
  537. body.passwordData = body.loginPassword;
  538. return _this.http.request(method, url, { body: body, observe: 'response' })
  539. .pipe(map((/**
  540. * @param {?} res
  541. * @return {?}
  542. */
  543. function (res) {
  544. if (_this.getOption(module + ".alwaysFail")) {
  545. throw _this.createFailResponse(data);
  546. }
  547. else if (!_this.getOption('success.getter')(module, res, _this.options)) {
  548. throw new ResultError(_this.getOption('messages.getter')(module, res, _this.options));
  549. }
  550. return res;
  551. })), map((/**
  552. * @param {?} res
  553. * @return {?}
  554. */
  555. function (res) {
  556. return new NbAuthResult(true, res, _this.getOption(module + ".redirect.success"), [], _this.getOption('messages.getter')(module, res, _this.options));
  557. })), catchError((/**
  558. * @param {?} res
  559. * @return {?}
  560. */
  561. function (res) {
  562. return _this.handleResponseError(res, module);
  563. })));
  564. })), concatAll());
  565. };
  566. /**
  567. * @param {?=} data
  568. * @return {?}
  569. */
  570. NamePasswordStrategyService.prototype.createUser = /**
  571. * @param {?=} data
  572. * @return {?}
  573. */
  574. function (data) {
  575. var _this = this;
  576. /** @type {?} */
  577. var module = 'createUser';
  578. /** @type {?} */
  579. var method = this.getOption(module + ".method");
  580. /** @type {?} */
  581. var url = this.getActionEndpoint(module);
  582. return this.getEncryptPassword(data.loginPassword).pipe(map((/**
  583. * @param {?} body
  584. * @return {?}
  585. */
  586. function (body) {
  587. body.userName = data.userName;
  588. body.loginID = data.loginID;
  589. return _this.http.request(method, url, { body: body, observe: 'response' })
  590. .pipe(map((/**
  591. * @param {?} res
  592. * @return {?}
  593. */
  594. function (res) {
  595. if (_this.getOption(module + ".alwaysFail")) {
  596. throw _this.createFailResponse(data);
  597. }
  598. else if (!_this.getOption('success.getter')(module, res, _this.options)) {
  599. throw new ResultError(_this.getOption('messages.getter')(module, res, _this.options));
  600. }
  601. return res;
  602. })), map((/**
  603. * @param {?} res
  604. * @return {?}
  605. */
  606. function (res) {
  607. return new NbAuthResult(true, res, _this.getOption(module + ".redirect.success"), [], _this.getOption('messages.getter')(module, res, _this.options));
  608. })), catchError((/**
  609. * @param {?} res
  610. * @return {?}
  611. */
  612. function (res) {
  613. return _this.handleResponseError(res, module);
  614. })));
  615. })), concatAll());
  616. };
  617. /**
  618. * @param {?=} data
  619. * @return {?}
  620. */
  621. NamePasswordStrategyService.prototype.updatePasswordForAdmin = /**
  622. * @param {?=} data
  623. * @return {?}
  624. */
  625. function (data) {
  626. var _this = this;
  627. /** @type {?} */
  628. var module = 'updatePasswordForAdmin';
  629. /** @type {?} */
  630. var method = this.getOption(module + ".method");
  631. /** @type {?} */
  632. var url = this.getActionEndpoint(module);
  633. return this.getEncryptPassword(data.loginPassword).pipe(map((/**
  634. * @param {?} body
  635. * @return {?}
  636. */
  637. function (body) {
  638. body.userID = data.userID;
  639. return _this.http.request(method, url, { body: body, observe: 'response' })
  640. .pipe(map((/**
  641. * @param {?} res
  642. * @return {?}
  643. */
  644. function (res) {
  645. if (_this.getOption(module + ".alwaysFail")) {
  646. throw _this.createFailResponse(data);
  647. }
  648. else if (!_this.getOption('success.getter')(module, res, _this.options)) {
  649. throw new ResultError(_this.getOption('messages.getter')(module, res, _this.options));
  650. }
  651. return res;
  652. })), map((/**
  653. * @param {?} res
  654. * @return {?}
  655. */
  656. function (res) {
  657. return new NbAuthResult(true, res, _this.getOption(module + ".redirect.success"), [], _this.getOption('messages.getter')(module, res, _this.options));
  658. })), catchError((/**
  659. * @param {?} res
  660. * @return {?}
  661. */
  662. function (res) {
  663. return _this.handleResponseError(res, module);
  664. })));
  665. })), concatAll());
  666. };
  667. /**
  668. * @param {?} password
  669. * @return {?}
  670. */
  671. NamePasswordStrategyService.prototype.getEncryptPassword = /**
  672. * @param {?} password
  673. * @return {?}
  674. */
  675. function (password) {
  676. var _this = this;
  677. /** @type {?} */
  678. var module = 'getPublicKey';
  679. /** @type {?} */
  680. var method = this.getOption(module + ".method");
  681. /** @type {?} */
  682. var url = this.getActionEndpoint(module);
  683. return this.http.request(method, url, { observe: 'response' })
  684. .pipe(map((/**
  685. * @param {?} res
  686. * @return {?}
  687. */
  688. function (res) {
  689. return encryptPassword(res.body, password);
  690. })), catchError((/**
  691. * @param {?} res
  692. * @return {?}
  693. */
  694. function (res) {
  695. return _this.handleResponseError(res, module);
  696. })));
  697. /**
  698. * @param {?} result
  699. * @param {?} data
  700. * @return {?}
  701. */
  702. function encryptPassword(result, data) {
  703. /** @type {?} */
  704. var now = Date.now();
  705. /** @type {?} */
  706. var encrypt = new JSEncrypt();
  707. encrypt.setPublicKey(result.data.publicPEMKey);
  708. /** @type {?} */
  709. var encryptPass = encrypt.encrypt(data + now);
  710. return {
  711. cryptoKeyID: result.data.cryptoKeyID,
  712. utcTimestamp: now,
  713. loginPassword: encryptPass
  714. };
  715. }
  716. };
  717. /**
  718. * @protected
  719. * @param {?} res
  720. * @param {?} module
  721. * @return {?}
  722. */
  723. NamePasswordStrategyService.prototype.handleResponseError = /**
  724. * @protected
  725. * @param {?} res
  726. * @param {?} module
  727. * @return {?}
  728. */
  729. function (res, module) {
  730. /** @type {?} */
  731. var errors = [];
  732. if (res instanceof HttpErrorResponse) {
  733. errors = this.getOption('errors.getter')(module, res, this.options);
  734. }
  735. else if (res instanceof NbAuthIllegalTokenError) {
  736. errors.push(res.message);
  737. }
  738. else if (res instanceof ResultError) {
  739. errors = res.message;
  740. }
  741. else {
  742. errors.push('Something went wrong.');
  743. }
  744. return of(new NbAuthResult(false, res, this.getOption(module + ".redirect.failure"), errors));
  745. };
  746. NamePasswordStrategyService.decorators = [
  747. { type: Injectable }
  748. ];
  749. /** @nocollapse */
  750. NamePasswordStrategyService.ctorParameters = function () { return [
  751. { type: HttpClient },
  752. { type: ActivatedRoute }
  753. ]; };
  754. return NamePasswordStrategyService;
  755. }(NbAuthStrategy));
  756. /**
  757. * @fileoverview added by tsickle
  758. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  759. */
  760. var ResetPasswordComponent = /** @class */ (function () {
  761. function ResetPasswordComponent(service, langService, options, cd, router) {
  762. if (options === void 0) { options = {}; }
  763. this.service = service;
  764. this.langService = langService;
  765. this.options = options;
  766. this.cd = cd;
  767. this.router = router;
  768. this.redirectDelay = 0;
  769. this.showMessages = {};
  770. this.strategy = '';
  771. this.submitted = false;
  772. this.errors = [];
  773. this.messages = [];
  774. this.user = {};
  775. this.redirectDelay = this.getConfigValue('forms.resetPassword.redirectDelay');
  776. this.showMessages = this.getConfigValue('forms.resetPassword.showMessages');
  777. this.strategy = this.getConfigValue('forms.resetPassword.strategy');
  778. }
  779. /**
  780. * @return {?}
  781. */
  782. ResetPasswordComponent.prototype.resetPass = /**
  783. * @return {?}
  784. */
  785. function () {
  786. var _this = this;
  787. this.errors = this.messages = [];
  788. this.submitted = true;
  789. this.service.resetPassword(this.strategy, this.user).subscribe((/**
  790. * @param {?} result
  791. * @return {?}
  792. */
  793. function (result) {
  794. _this.submitted = false;
  795. if (result.isSuccess()) {
  796. _this.messages = result.getMessages();
  797. }
  798. else {
  799. _this.errors = result.getErrors();
  800. }
  801. /** @type {?} */
  802. var redirect = result.getRedirect();
  803. if (redirect) {
  804. setTimeout((/**
  805. * @return {?}
  806. */
  807. function () {
  808. return _this.router.navigateByUrl(redirect);
  809. }), _this.redirectDelay);
  810. }
  811. _this.cd.detectChanges();
  812. }));
  813. };
  814. /**
  815. * @param {?} key
  816. * @return {?}
  817. */
  818. ResetPasswordComponent.prototype.getConfigValue = /**
  819. * @param {?} key
  820. * @return {?}
  821. */
  822. function (key) {
  823. return getDeepFromObject(this.options, key, null);
  824. };
  825. ResetPasswordComponent.decorators = [
  826. { type: Component, args: [{
  827. selector: 'auth-reset-password-page',
  828. template: "<h1 id=\"title\" class=\"title\" translate>\u4FEE\u6539\u5BC6\u7801</h1>\r\n<p class=\"sub-title\" translate>\u8BF7\u8BBE\u7F6E\u60A8\u7684\u65B0\u5BC6\u7801</p>\r\n\r\n<nb-alert *ngIf=\"showMessages.error && errors?.length && !submitted\" outline=\"danger\" role=\"alert\">\r\n <p class=\"alert-title\"><b translate>\u9519\u8BEF!</b></p>\r\n <ul class=\"alert-message-list\">\r\n <li *ngFor=\"let error of errors\" class=\"alert-message\">{{ error }}</li>\r\n </ul>\r\n</nb-alert>\r\n\r\n<nb-alert *ngIf=\"showMessages.success && messages?.length && !submitted\" outline=\"success\" role=\"alert\">\r\n <p class=\"alert-title\"><b translate>\u6210\u529F!</b></p>\r\n <ul class=\"alert-message-list\">\r\n <li *ngFor=\"let message of messages\" class=\"alert-message\">{{ message }}</li>\r\n </ul>\r\n</nb-alert>\r\n\r\n<form (ngSubmit)=\"resetPass()\" #resetPassForm=\"ngForm\" aria-labelledby=\"title\">\r\n\r\n <div class=\"form-control-group\">\r\n <label class=\"label\" for=\"input-old-password\" translate>\u65E7\u5BC6\u7801:</label>\r\n <input nbInput\r\n [(ngModel)]=\"user.loginPasswordOld\"\r\n #oldPassword=\"ngModel\"\r\n type=\"password\"\r\n id=\"input-old-password\"\r\n name=\"oldPassword\"\r\n class=\"first\"\r\n placeholder=\"{{'\u65B0\u5BC6\u7801'| translate}}\"\r\n autofocus\r\n fullWidth\r\n [status]=\"oldPassword.dirty ? (oldPassword.invalid ? 'danger' : 'success') : ''\"\r\n [required]=\"getConfigValue('forms.validation.password.required')\"\r\n [minlength]=\"getConfigValue('forms.validation.password.minLength')\"\r\n [maxlength]=\"getConfigValue('forms.validation.password.maxLength')\"\r\n [attr.aria-invalid]=\"oldPassword.invalid && oldPassword.touched ? true : null\">\r\n <ng-container *ngIf=\"oldPassword.invalid && oldPassword.touched\">\r\n <p class=\"error-message\" *ngIf=\"oldPassword.errors?.required\" translate=\"\u65E7\u5BC6\u7801\u662F\u5FC5\u586B\u7684!\">\r\n\r\n </p>\r\n <p class=\"error-message\" *ngIf=\"oldPassword.errors?.minlength || oldPassword.errors?.maxlength\"\r\n translate=\"\u5BC6\u7801\u89C4\u5219\u63D0\u793A\" [translateParams]=\"{minLength: getConfigValue('forms.validation.password.minLength'), maxLength:getConfigValue('forms.validation.password.maxLength')}\">\r\n \u5BC6\u7801\u5E94\u8BE5\u5305\u542B\r\n \u6700\u5C0F\u957F\u5EA6 {{ getConfigValue('forms.validation.password.minLength') }}\r\n \u6700\u5927\u957F\u5EA6 {{ getConfigValue('forms.validation.password.maxLength') }}\r\n \u4E2A\u5B57\u7B26\r\n </p>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"form-control-group\">\r\n <label class=\"label\" for=\"input-new-password\" translate>\u65B0\u5BC6\u7801:</label>\r\n <input nbInput\r\n [(ngModel)]=\"user.loginPasswordNew\"\r\n #newPassword=\"ngModel\"\r\n type=\"password\"\r\n id=\"input-new-password\"\r\n name=\"newPassword\"\r\n class=\"first\"\r\n placeholder=\"{{'\u65B0\u5BC6\u7801'| translate}}\"\r\n autofocus\r\n fullWidth\r\n [status]=\"newPassword.dirty ? (newPassword.invalid ? 'danger' : 'success') : ''\"\r\n [required]=\"getConfigValue('forms.validation.password.required')\"\r\n [minlength]=\"getConfigValue('forms.validation.password.minLength')\"\r\n [maxlength]=\"getConfigValue('forms.validation.password.maxLength')\"\r\n [attr.aria-invalid]=\"newPassword.invalid && newPassword.touched ? true : null\">\r\n <ng-container *ngIf=\"newPassword.invalid && newPassword.touched\">\r\n <p class=\"error-message\" *ngIf=\"newPassword.errors?.required\" translate=\"\u65B0\u5BC6\u7801\u662F\u5FC5\u586B\u7684!\">\r\n\r\n </p>\r\n <p class=\"error-message\" *ngIf=\"newPassword.errors?.minlength || newPassword.errors?.maxlength\"\r\n translate=\"\u5BC6\u7801\u89C4\u5219\u63D0\u793A\"\r\n [translateParams]=\"{minLength: getConfigValue('forms.validation.password.minLength'), maxLength:getConfigValue('forms.validation.password.maxLength')}\">\r\n\r\n \u5BC6\u7801\u5E94\u8BE5\u5305\u542B\r\n \u6700\u5C0F\u957F\u5EA6 {{ getConfigValue('forms.validation.password.minLength') }}\r\n \u6700\u5927\u957F\u5EA6 {{ getConfigValue('forms.validation.password.maxLength') }}\r\n \u4E2A\u5B57\u7B26\r\n </p>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label class=\"label\" for=\"input-re-password\" translate>\u786E\u8BA4\u5BC6\u7801:</label>\r\n <input nbInput\r\n [(ngModel)]=\"user.confirmPassword\"\r\n #rePass=\"ngModel\"\r\n id=\"input-re-password\"\r\n name=\"rePass\"\r\n type=\"password\"\r\n class=\"last\"\r\n placeholder=\"{{'\u786E\u8BA4\u5BC6\u7801'| translate}}\"\r\n fullWidth\r\n [status]=\"rePass.touched\r\n ? (rePass.invalid || newPassword.value != rePass.value ? 'danger' : 'success')\r\n : ''\"\r\n [required]=\"getConfigValue('forms.validation.password.required')\"\r\n [attr.aria-invalid]=\"rePass.invalid && rePass.touched ? true : null\">\r\n <ng-container *ngIf=\"rePass.touched\">\r\n <p class=\"error-message\" *ngIf=\"rePass.invalid && rePass.errors?.required\" translate=\"\u786E\u8BA4\u5BC6\u7801\u662F\u5FC5\u586B\u7684!\">\r\n\r\n </p>\r\n <p class=\"error-message\" *ngIf=\"newPassword.value != rePass.value && !rePass.errors?.required\" translate=\"\u4E0E\u7B2C\u4E00\u6B21\u8F93\u5165\u4E0D\u7B26\u5408\"></p>\r\n </ng-container>\r\n </div>\r\n\r\n <button nbButton\r\n status=\"success\"\r\n fullWidth\r\n [disabled]=\"submitted || !resetPassForm.valid\"\r\n [class.btn-pulse]=\"submitted\" translate=\"\u4FEE\u6539\u5BC6\u7801\">\r\n </button>\r\n</form>\r\n\r\n<!--<section class=\"sign-in-or-up\" aria-label=\"Sign in or sign up\">-->\r\n <!--<p><a class=\"text-link\" routerLink=\"../login\">Back to Log In</a></p>-->\r\n <!--<p><a class=\"text-link\" routerLink=\"../register\">Register</a></p>-->\r\n<!--</section>-->\r\n",
  829. changeDetection: ChangeDetectionStrategy.OnPush,
  830. styles: [":host .form-group:last-of-type{margin-bottom:3rem}"]
  831. }] }
  832. ];
  833. /** @nocollapse */
  834. ResetPasswordComponent.ctorParameters = function () { return [
  835. { type: NbAuthService },
  836. { type: LoginLangService },
  837. { type: undefined, decorators: [{ type: Inject, args: [NB_AUTH_OPTIONS,] }] },
  838. { type: ChangeDetectorRef },
  839. { type: Router }
  840. ]; };
  841. return ResetPasswordComponent;
  842. }());
  843. /**
  844. * @fileoverview added by tsickle
  845. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  846. */
  847. var LogoutComponent = /** @class */ (function () {
  848. function LogoutComponent(service, langService, options, router) {
  849. if (options === void 0) { options = {}; }
  850. this.service = service;
  851. this.langService = langService;
  852. this.options = options;
  853. this.router = router;
  854. this.redirectDelay = 0;
  855. this.strategy = '';
  856. this.redirectDelay = this.getConfigValue('forms.logout.redirectDelay');
  857. this.strategy = this.getConfigValue('forms.logout.strategy');
  858. }
  859. /**
  860. * @return {?}
  861. */
  862. LogoutComponent.prototype.ngOnInit = /**
  863. * @return {?}
  864. */
  865. function () {
  866. this.logout(this.strategy);
  867. };
  868. /**
  869. * @param {?} strategy
  870. * @return {?}
  871. */
  872. LogoutComponent.prototype.logout = /**
  873. * @param {?} strategy
  874. * @return {?}
  875. */
  876. function (strategy) {
  877. var _this = this;
  878. this.service.logout(strategy).subscribe((/**
  879. * @param {?} result
  880. * @return {?}
  881. */
  882. function (result) {
  883. /** @type {?} */
  884. var redirect = result.getRedirect();
  885. if (redirect) {
  886. setTimeout((/**
  887. * @return {?}
  888. */
  889. function () {
  890. return _this.router.navigateByUrl(redirect);
  891. }), _this.redirectDelay);
  892. }
  893. }));
  894. };
  895. /**
  896. * @param {?} key
  897. * @return {?}
  898. */
  899. LogoutComponent.prototype.getConfigValue = /**
  900. * @param {?} key
  901. * @return {?}
  902. */
  903. function (key) {
  904. return getDeepFromObject$1(this.options, key, null);
  905. };
  906. LogoutComponent.decorators = [
  907. { type: Component, args: [{
  908. selector: 'auth-logout',
  909. template: "<div translate=\"\u767B\u51FA\u63D0\u793A\"></div>\r\n",
  910. styles: ["div{text-align:center}"]
  911. }] }
  912. ];
  913. /** @nocollapse */
  914. LogoutComponent.ctorParameters = function () { return [
  915. { type: NbAuthService },
  916. { type: LoginLangService },
  917. { type: undefined, decorators: [{ type: Inject, args: [NB_AUTH_OPTIONS,] }] },
  918. { type: Router }
  919. ]; };
  920. return LogoutComponent;
  921. }());
  922. /**
  923. * @fileoverview added by tsickle
  924. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  925. */
  926. var LoginStatusService = /** @class */ (function () {
  927. function LoginStatusService() {
  928. this.subject = new Subject();
  929. }
  930. /**
  931. * @param {?} status
  932. * @return {?}
  933. */
  934. LoginStatusService.prototype.changeStatus = /**
  935. * @param {?} status
  936. * @return {?}
  937. */
  938. function (status) {
  939. if (this.status !== status) {
  940. this.status = status;
  941. this.subject.next(status);
  942. }
  943. };
  944. LoginStatusService.decorators = [
  945. { type: Injectable }
  946. ];
  947. /** @nocollapse */
  948. LoginStatusService.ctorParameters = function () { return []; };
  949. return LoginStatusService;
  950. }());
  951. /** @enum {number} */
  952. var LoginStatus = {
  953. Login: 1,
  954. Logout: 2,
  955. };
  956. LoginStatus[LoginStatus.Login] = 'Login';
  957. LoginStatus[LoginStatus.Logout] = 'Logout';
  958. /**
  959. * @fileoverview added by tsickle
  960. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  961. */
  962. var GeAdminAuthModule = /** @class */ (function () {
  963. function GeAdminAuthModule() {
  964. }
  965. GeAdminAuthModule.decorators = [
  966. { type: NgModule, args: [{
  967. declarations: [
  968. LoginComponent,
  969. ResetPasswordComponent,
  970. LogoutComponent
  971. ],
  972. imports: [
  973. CommonModule,
  974. NbLayoutModule,
  975. NbCardModule,
  976. NbCheckboxModule,
  977. NbAlertModule,
  978. NbInputModule,
  979. NbButtonModule,
  980. RouterModule,
  981. FormsModule,
  982. TranslateModule.forRoot()
  983. ],
  984. providers: [
  985. NamePasswordStrategyService,
  986. LoginStatusService,
  987. LoginLangService
  988. ],
  989. exports: [
  990. LoginComponent,
  991. ResetPasswordComponent,
  992. LogoutComponent
  993. ]
  994. },] }
  995. ];
  996. return GeAdminAuthModule;
  997. }());
  998. export { AUTH_DEFAULT_LANG, GeAdminAuthModule, LoginComponent, LoginLangService, LoginStatus, LoginStatusService, LogoutComponent, NamePasswordAuthStrategyOptions, NamePasswordStrategyService, ResetPasswordComponent, ResultError, namePasswordStrategyOptions };
  999. //# sourceMappingURL=ge-admin-auth.js.map