diff --git a/source/logic/backend.ts b/source/logic/backend.ts index 6ae5b70..be323db 100644 --- a/source/logic/backend.ts +++ b/source/logic/backend.ts @@ -171,13 +171,13 @@ namespace _zeitbild.frontend_web.backend /** */ export async function session_prepare( + input : any ) : Promise<{kind : string; data : any;}> { return call( - lib_plankton.http.enum_method.get, + lib_plankton.http.enum_method.post, "/session/prepare", - { - } + input ); } diff --git a/source/logic/conf.ts b/source/logic/conf.ts index c2b89ac..dbc7950 100644 --- a/source/logic/conf.ts +++ b/source/logic/conf.ts @@ -42,7 +42,22 @@ namespace _zeitbild.frontend_web.conf ], "additionalProperties": false, "default": {} - } + }, + "misc": { + "nullable": false, + "type": "object", + "properties": { + "oidc_redirect_uri_template": { + "nullable": true, + "type": "string", + "default": "http://localhost:8888/#oidc_finish,session_key={{session_key}}" + }, + }, + "required": [ + ], + "additionalProperties": false, + "default": {} + }, }, "required": [ "version", diff --git a/source/pages/login/logic.ts b/source/pages/login/logic.ts index e1af974..9d0c6ab 100644 --- a/source/pages/login/logic.ts +++ b/source/pages/login/logic.ts @@ -7,6 +7,9 @@ namespace _zeitbild.frontend_web.pages "login", async (parameters, target_element) => { const preparation : {kind : string; data : any;} = await _zeitbild.frontend_web.backend.session_prepare( + { + "oidc_redirect_uri_template": _zeitbild.frontend_web.conf.get()["misc"]["oidc_redirect_uri_template"], + } ); switch (preparation.kind) { case "internal": {