Enable possiblity to support custom pages (without forking keycloakify)
This commit is contained in:
@ -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?: {
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
},
|
||||
|
Reference in New Issue
Block a user