[mod] auth-Kram für OIDC
This commit is contained in:
parent
9b06f8d223
commit
c897dc51a5
3 changed files with 22 additions and 4 deletions
|
@ -171,13 +171,13 @@ namespace _zeitbild.frontend_web.backend
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
export async function session_prepare(
|
export async function session_prepare(
|
||||||
|
input : any
|
||||||
) : Promise<{kind : string; data : any;}>
|
) : Promise<{kind : string; data : any;}>
|
||||||
{
|
{
|
||||||
return call(
|
return call(
|
||||||
lib_plankton.http.enum_method.get,
|
lib_plankton.http.enum_method.post,
|
||||||
"/session/prepare",
|
"/session/prepare",
|
||||||
{
|
input
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,22 @@ namespace _zeitbild.frontend_web.conf
|
||||||
],
|
],
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"default": {}
|
"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": [
|
"required": [
|
||||||
"version",
|
"version",
|
||||||
|
|
|
@ -7,6 +7,9 @@ namespace _zeitbild.frontend_web.pages
|
||||||
"login",
|
"login",
|
||||||
async (parameters, target_element) => {
|
async (parameters, target_element) => {
|
||||||
const preparation : {kind : string; data : any;} = await _zeitbild.frontend_web.backend.session_prepare(
|
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) {
|
switch (preparation.kind) {
|
||||||
case "internal": {
|
case "internal": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue