update dependencies and devDependencies, address lint issues
[squeep-indie-auther] / src / template / authorization-error-html.js
1 'use strict';
2
3 const th = require('./template-helper');
4 const { sessionNavLinks } = require('@squeep/authentication-module');
5
6 /**
7 *
8 * @param {object} ctx context
9 * @param {object} ctx.session session
10 * @param {string=} ctx.session.error errors
11 * @param {string[]=} ctx.session.errorDescriptions errors
12 * @param {object} options options
13 * @param {object} options.manager manager options
14 * @param {string} options.manager.pageTitle page title
15 * @param {string} options.manager.footerEntries footer entries
16 * @returns {string} page
17 */
18 module.exports = (ctx, options) => {
19 const pagePathLevel = 0;
20 const htmlOptions = {
21 pageIdentifier: 'authorizationError',
22 pageTitle: options.manager.pageTitle,
23 logoUrl: options.manager.logoUrl,
24 footerEntries: options.manager.footerEntries,
25 errorContent: ctx.errorContent || ['Unknown Error'],
26 };
27 th.navLinks(pagePathLevel, ctx, htmlOptions);
28 sessionNavLinks(pagePathLevel, ctx, htmlOptions);
29 return th.htmlPage(pagePathLevel, ctx, htmlOptions, []);
30 };