Enable possiblity to support custom pages (without forking keycloakify)

This commit is contained in:
garronej
2021-06-23 18:03:49 +02:00
parent e3b41c9bd1
commit c9b2db625c
7 changed files with 16 additions and 21 deletions

View File

@ -123,11 +123,6 @@ export declare namespace KcContextBase {
passwordRequired: boolean;
recaptchaRequired: boolean;
recaptchaSiteKey?: string;
/**
* Defined when you use the keycloak-mail-whitelisting keycloak plugin
* (https://github.com/micedre/keycloak-mail-whitelisting)
*/
authorizedMailDomains?: string[];
social: {
displayInfo: boolean;
providers?: {

View File

@ -5,14 +5,14 @@ import { ftlValuesGlobalName } from "../../bin/build-keycloak-theme/ftlValuesGlo
export function getKcContext<KcContextExtended extends { pageId: string; } = never>(
params?: {
mockPageId: KcContextBase["pageId"] | KcContextExtended["pageId"] | false;
mockPageId?: KcContextBase["pageId"] | KcContextExtended["pageId"];
kcContextExtendedMock?: KcContextExtended[];
}
): { kcContext: KcContextBase | KcContextExtended & KcContextBase.Common; } {
): { kcContext: (KcContextBase | KcContextExtended & KcContextBase.Common) | undefined; } {
const { mockPageId, kcContextExtendedMock } = params ?? { "mockPageId": false };
if (typeof mockPageId === "string") {
if (mockPageId !== undefined) {
return {
"pageId": mockPageId,

View File

@ -166,13 +166,6 @@ export const kcContextMocks: KcContextBase[] = [
},
"passwordRequired": true,
"recaptchaRequired": false,
"authorizedMailDomains": [
"example.com",
"another-example.com",
"*.yet-another-example.com",
"*.example.com",
"hello-world.com"
],
"social": {
"displayInfo": true
},