2024-09-13 17:49:32 +02:00
|
|
|
|
|
|
|
namespace _zeitbild.api
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
export function register_session_oidc(
|
|
|
|
rest_subject : lib_plankton.rest.type_rest
|
|
|
|
) : void
|
|
|
|
{
|
|
|
|
register<null, null>(
|
|
|
|
rest_subject,
|
|
|
|
lib_plankton.http.enum_method.delete,
|
|
|
|
"/session/oidc",
|
|
|
|
{
|
2024-09-18 18:17:25 +02:00
|
|
|
"description": "verarbeitet einen OIDC login callback",
|
2024-09-13 17:49:32 +02:00
|
|
|
"input_schema": () => ({
|
|
|
|
"type": "null",
|
|
|
|
}),
|
|
|
|
"output_schema": () => ({
|
|
|
|
"type": "null",
|
|
|
|
}),
|
|
|
|
"restriction": restriction_logged_in,
|
|
|
|
"execution": async (stuff) => {
|
2024-09-18 18:17:25 +02:00
|
|
|
// do NOT wait
|
|
|
|
_zeitbild.auth.control(
|
|
|
|
{
|
|
|
|
"kind": "authorization_callback",
|
|
|
|
"data": {
|
|
|
|
"http_request": http_request
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
2024-09-13 17:49:32 +02:00
|
|
|
return Promise.resolve({
|
|
|
|
"status_code": 200,
|
|
|
|
"data": null,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|