initial commit
[squeep-indie-auther] / src / template / authorization-error-html.js
diff --git a/src/template/authorization-error-html.js b/src/template/authorization-error-html.js
new file mode 100644 (file)
index 0000000..ee2e4f2
--- /dev/null
@@ -0,0 +1,26 @@
+'use strict';
+
+const th = require('./template-helper');
+
+
+/**
+ * 
+ * @param {Object} ctx
+ * @param {Object} ctx.session
+ * @param {String=} ctx.session.error
+ * @param {String[]=} ctx.session.errorDescriptions
+ * @param {Object} options
+ * @param {Object} options.manager
+ * @param {String} options.manager.pageTitle
+ * @param {String} options.manager.footerEntries
+ * @returns {String}
+ */
+module.exports = (ctx, options) => {
+  const htmlOptions = {
+    pageTitle: options.manager.pageTitle,
+    logoUrl: options.manager.logoUrl,
+    footerEntries: options.manager.footerEntries,
+    errorContent: ctx.errorContent || ['Unknown Error'],
+  };
+  return th.htmlPage(0, ctx, htmlOptions, []);
+};
\ No newline at end of file