diff --git a/frontend/src/components/admin/AdminMainPre.svelte b/frontend/src/components/admin/AdminMainPre.svelte
new file mode 100644
index 00000000..f81c5cd7
--- /dev/null
+++ b/frontend/src/components/admin/AdminMainPre.svelte
@@ -0,0 +1,76 @@
+
+
+
+ Admin
+
+
+
+ {#if !sessionInfo && !mfaReqErr}
+
+ {:else if mfaReqErr}
+
+
+ A rauthy admin account must have MFA enabled.
+ Please navigate to your account and activate MFA.
+ Afterwards, you need to do a logout and log back in.
+
+
+
+
+ {:else if !isAdmin}
+
+
+ You are not assigned to the rauthy_admin role and have no access to the admin panel.
+
+
+
+ {:else}
+
+ {/if}
+
+
+
diff --git a/frontend/src/routes/admin/+page.svelte b/frontend/src/routes/admin/+page.svelte
index 627fac28..f1e26cdc 100644
--- a/frontend/src/routes/admin/+page.svelte
+++ b/frontend/src/routes/admin/+page.svelte
@@ -1,74 +1,5 @@
-
- Rauthy Admin
-
-
-
- {#if !sessionInfo && !mfaReqErr}
-
- {:else if mfaReqErr}
-
-
- A rauthy admin account must have MFA enabled.
- Please navigate to your account and activate MFA.
- Afterwards, you need to do a logout and log back in.
-
-
-
-
- {:else if !isAdmin}
-
-
- You are not assigned to the rauthy_admin role and have no access to the admin panel.
-
-
-
- {:else}
-
- {/if}
-
-
-
+
\ No newline at end of file
diff --git a/frontend/src/routes/admin/attributes/+page.svelte b/frontend/src/routes/admin/attributes/+page.svelte
new file mode 100644
index 00000000..59b3a973
--- /dev/null
+++ b/frontend/src/routes/admin/attributes/+page.svelte
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/routes/admin/clients/+page.svelte b/frontend/src/routes/admin/clients/+page.svelte
new file mode 100644
index 00000000..4393abe1
--- /dev/null
+++ b/frontend/src/routes/admin/clients/+page.svelte
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/routes/admin/config/+page.svelte b/frontend/src/routes/admin/config/+page.svelte
new file mode 100644
index 00000000..a1fa8f29
--- /dev/null
+++ b/frontend/src/routes/admin/config/+page.svelte
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/routes/admin/docs/+page.svelte b/frontend/src/routes/admin/docs/+page.svelte
new file mode 100644
index 00000000..b05fa9f0
--- /dev/null
+++ b/frontend/src/routes/admin/docs/+page.svelte
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/routes/admin/groups/+page.svelte b/frontend/src/routes/admin/groups/+page.svelte
new file mode 100644
index 00000000..340c5cd3
--- /dev/null
+++ b/frontend/src/routes/admin/groups/+page.svelte
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/routes/admin/roles/+page.svelte b/frontend/src/routes/admin/roles/+page.svelte
new file mode 100644
index 00000000..0c580fd8
--- /dev/null
+++ b/frontend/src/routes/admin/roles/+page.svelte
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/routes/admin/scopes/+page.svelte b/frontend/src/routes/admin/scopes/+page.svelte
new file mode 100644
index 00000000..101e4c4d
--- /dev/null
+++ b/frontend/src/routes/admin/scopes/+page.svelte
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/routes/admin/sessions/+page.svelte b/frontend/src/routes/admin/sessions/+page.svelte
new file mode 100644
index 00000000..2c0b06d9
--- /dev/null
+++ b/frontend/src/routes/admin/sessions/+page.svelte
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/routes/admin/users/+page.svelte b/frontend/src/routes/admin/users/+page.svelte
new file mode 100644
index 00000000..59b3a973
--- /dev/null
+++ b/frontend/src/routes/admin/users/+page.svelte
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/rauthy-handlers/src/generic.rs b/rauthy-handlers/src/generic.rs
index 3ad50472..179e1153 100644
--- a/rauthy-handlers/src/generic.rs
+++ b/rauthy-handlers/src/generic.rs
@@ -18,7 +18,11 @@ use rauthy_models::response::{
Argon2ParamsResponse, EncKeysResponse, HealthResponse, LoginTimeResponse,
PasswordPolicyResponse,
};
-use rauthy_models::templates::{AccountHtml, AdminHtml, IndexHtml};
+use rauthy_models::templates::{
+ AccountHtml, AdminAttributesHtml, AdminClientsHtml, AdminConfigHtml, AdminDocsHtml,
+ AdminGroupsHtml, AdminHtml, AdminRolesHtml, AdminScopesHtml, AdminSessionsHtml, AdminUsersHtml,
+ IndexHtml,
+};
use rauthy_service::encryption;
use redhac::{cache_get, cache_get_from, cache_get_value};
use std::borrow::Cow;
@@ -87,6 +91,128 @@ pub async fn get_admin_html(data: web::Data
) -> Result) -> Result {
+ let colors = ColorEntity::find_rauthy(&data).await?;
+ let (body, nonce) = AdminAttributesHtml::build(&colors);
+
+ Ok(HttpResponse::Ok()
+ .insert_header(HEADER_HTML)
+ .insert_header(build_csp_header(&nonce))
+ .body(body))
+}
+
+#[get("/admin/clients")]
+#[has_permissions("all")]
+pub async fn get_admin_clients_html(
+ data: web::Data,
+) -> Result {
+ let colors = ColorEntity::find_rauthy(&data).await?;
+ let (body, nonce) = AdminClientsHtml::build(&colors);
+
+ Ok(HttpResponse::Ok()
+ .insert_header(HEADER_HTML)
+ .insert_header(build_csp_header(&nonce))
+ .body(body))
+}
+
+#[get("/admin/config")]
+#[has_permissions("all")]
+pub async fn get_admin_config_html(
+ data: web::Data,
+) -> Result {
+ let colors = ColorEntity::find_rauthy(&data).await?;
+ let (body, nonce) = AdminConfigHtml::build(&colors);
+
+ Ok(HttpResponse::Ok()
+ .insert_header(HEADER_HTML)
+ .insert_header(build_csp_header(&nonce))
+ .body(body))
+}
+
+#[get("/admin/docs")]
+#[has_permissions("all")]
+pub async fn get_admin_docs_html(data: web::Data) -> Result {
+ let colors = ColorEntity::find_rauthy(&data).await?;
+ let (body, nonce) = AdminDocsHtml::build(&colors);
+
+ Ok(HttpResponse::Ok()
+ .insert_header(HEADER_HTML)
+ .insert_header(build_csp_header(&nonce))
+ .body(body))
+}
+
+#[get("/admin/groups")]
+#[has_permissions("all")]
+pub async fn get_admin_groups_html(
+ data: web::Data,
+) -> Result {
+ let colors = ColorEntity::find_rauthy(&data).await?;
+ let (body, nonce) = AdminGroupsHtml::build(&colors);
+
+ Ok(HttpResponse::Ok()
+ .insert_header(HEADER_HTML)
+ .insert_header(build_csp_header(&nonce))
+ .body(body))
+}
+
+#[get("/admin/roles")]
+#[has_permissions("all")]
+pub async fn get_admin_roles_html(
+ data: web::Data,
+) -> Result {
+ let colors = ColorEntity::find_rauthy(&data).await?;
+ let (body, nonce) = AdminRolesHtml::build(&colors);
+
+ Ok(HttpResponse::Ok()
+ .insert_header(HEADER_HTML)
+ .insert_header(build_csp_header(&nonce))
+ .body(body))
+}
+
+#[get("/admin/scopes")]
+#[has_permissions("all")]
+pub async fn get_admin_scopes_html(
+ data: web::Data,
+) -> Result {
+ let colors = ColorEntity::find_rauthy(&data).await?;
+ let (body, nonce) = AdminScopesHtml::build(&colors);
+
+ Ok(HttpResponse::Ok()
+ .insert_header(HEADER_HTML)
+ .insert_header(build_csp_header(&nonce))
+ .body(body))
+}
+
+#[get("/admin/sessions")]
+#[has_permissions("all")]
+pub async fn get_admin_sessions_html(
+ data: web::Data,
+) -> Result {
+ let colors = ColorEntity::find_rauthy(&data).await?;
+ let (body, nonce) = AdminSessionsHtml::build(&colors);
+
+ Ok(HttpResponse::Ok()
+ .insert_header(HEADER_HTML)
+ .insert_header(build_csp_header(&nonce))
+ .body(body))
+}
+
+#[get("/admin/users")]
+#[has_permissions("all")]
+pub async fn get_admin_users_html(
+ data: web::Data,
+) -> Result {
+ let colors = ColorEntity::find_rauthy(&data).await?;
+ let (body, nonce) = AdminUsersHtml::build(&colors);
+
+ Ok(HttpResponse::Ok()
+ .insert_header(HEADER_HTML)
+ .insert_header(build_csp_header(&nonce))
+ .body(body))
+}
+
/// Check if the given JWT Token is valid
///
/// This endpoint only exists for checking if the User accessing it has a valid token / session or
diff --git a/rauthy-main/src/main.rs b/rauthy-main/src/main.rs
index ba7b6f29..018abc72 100644
--- a/rauthy-main/src/main.rs
+++ b/rauthy-main/src/main.rs
@@ -259,6 +259,15 @@ async fn actix_main(app_state: web::Data) -> std::io::Result<()> {
.service(generic::get_index)
.service(generic::get_account_html)
.service(generic::get_admin_html)
+ .service(generic::get_admin_attr_html)
+ .service(generic::get_admin_clients_html)
+ .service(generic::get_admin_config_html)
+ .service(generic::get_admin_docs_html)
+ .service(generic::get_admin_groups_html)
+ .service(generic::get_admin_roles_html)
+ .service(generic::get_admin_scopes_html)
+ .service(generic::get_admin_sessions_html)
+ .service(generic::get_admin_users_html)
.service(generic::get_auth_check)
.service(generic::get_auth_check_admin)
.service(oidc::get_authorize)
diff --git a/rauthy-models/src/templates.rs b/rauthy-models/src/templates.rs
index a0c6c93a..ae99e7af 100644
--- a/rauthy-models/src/templates.rs
+++ b/rauthy-models/src/templates.rs
@@ -167,6 +167,438 @@ impl AdminHtml<'_> {
}
}
+#[derive(Default, Template)]
+#[template(path = "html/admin/attributes.html")]
+pub struct AdminAttributesHtml<'a> {
+ pub csrf_token: &'a str,
+ pub data: &'a str,
+ pub action: &'a str,
+ pub col_act1: &'a str,
+ pub col_act1a: &'a str,
+ pub col_act2: &'a str,
+ pub col_act2a: &'a str,
+ pub col_acnt: &'a str,
+ pub col_acnta: &'a str,
+ pub col_ok: &'a str,
+ pub col_err: &'a str,
+ pub col_glow: &'a str,
+ pub col_gmid: &'a str,
+ pub col_ghigh: &'a str,
+ pub col_text: &'a str,
+ pub col_bg: &'a str,
+ pub nonce: &'a str,
+}
+
+impl AdminAttributesHtml<'_> {
+ pub fn build(colors: &Colors) -> (String, String) {
+ let nonce = nonce();
+
+ let res = AdminAttributesHtml {
+ col_act1: &colors.act1,
+ col_act1a: &colors.act1a,
+ col_act2: &colors.act2,
+ col_act2a: &colors.act2a,
+ col_acnt: &colors.acnt,
+ col_acnta: &colors.acnta,
+ col_ok: &colors.ok,
+ col_err: &colors.err,
+ col_glow: &colors.glow,
+ col_gmid: &colors.gmid,
+ col_ghigh: &colors.ghigh,
+ col_text: &colors.text,
+ col_bg: &colors.bg,
+ nonce: &nonce,
+ ..Default::default()
+ };
+
+ (res.render().unwrap(), nonce)
+ }
+}
+
+#[derive(Default, Template)]
+#[template(path = "html/admin/clients.html")]
+pub struct AdminClientsHtml<'a> {
+ pub csrf_token: &'a str,
+ pub data: &'a str,
+ pub action: &'a str,
+ pub col_act1: &'a str,
+ pub col_act1a: &'a str,
+ pub col_act2: &'a str,
+ pub col_act2a: &'a str,
+ pub col_acnt: &'a str,
+ pub col_acnta: &'a str,
+ pub col_ok: &'a str,
+ pub col_err: &'a str,
+ pub col_glow: &'a str,
+ pub col_gmid: &'a str,
+ pub col_ghigh: &'a str,
+ pub col_text: &'a str,
+ pub col_bg: &'a str,
+ pub nonce: &'a str,
+}
+
+impl AdminClientsHtml<'_> {
+ pub fn build(colors: &Colors) -> (String, String) {
+ let nonce = nonce();
+
+ let res = AdminClientsHtml {
+ col_act1: &colors.act1,
+ col_act1a: &colors.act1a,
+ col_act2: &colors.act2,
+ col_act2a: &colors.act2a,
+ col_acnt: &colors.acnt,
+ col_acnta: &colors.acnta,
+ col_ok: &colors.ok,
+ col_err: &colors.err,
+ col_glow: &colors.glow,
+ col_gmid: &colors.gmid,
+ col_ghigh: &colors.ghigh,
+ col_text: &colors.text,
+ col_bg: &colors.bg,
+ nonce: &nonce,
+ ..Default::default()
+ };
+
+ (res.render().unwrap(), nonce)
+ }
+}
+
+#[derive(Default, Template)]
+#[template(path = "html/admin/config.html")]
+pub struct AdminConfigHtml<'a> {
+ pub csrf_token: &'a str,
+ pub data: &'a str,
+ pub action: &'a str,
+ pub col_act1: &'a str,
+ pub col_act1a: &'a str,
+ pub col_act2: &'a str,
+ pub col_act2a: &'a str,
+ pub col_acnt: &'a str,
+ pub col_acnta: &'a str,
+ pub col_ok: &'a str,
+ pub col_err: &'a str,
+ pub col_glow: &'a str,
+ pub col_gmid: &'a str,
+ pub col_ghigh: &'a str,
+ pub col_text: &'a str,
+ pub col_bg: &'a str,
+ pub nonce: &'a str,
+}
+
+impl AdminConfigHtml<'_> {
+ pub fn build(colors: &Colors) -> (String, String) {
+ let nonce = nonce();
+
+ let res = AdminConfigHtml {
+ col_act1: &colors.act1,
+ col_act1a: &colors.act1a,
+ col_act2: &colors.act2,
+ col_act2a: &colors.act2a,
+ col_acnt: &colors.acnt,
+ col_acnta: &colors.acnta,
+ col_ok: &colors.ok,
+ col_err: &colors.err,
+ col_glow: &colors.glow,
+ col_gmid: &colors.gmid,
+ col_ghigh: &colors.ghigh,
+ col_text: &colors.text,
+ col_bg: &colors.bg,
+ nonce: &nonce,
+ ..Default::default()
+ };
+
+ (res.render().unwrap(), nonce)
+ }
+}
+
+#[derive(Default, Template)]
+#[template(path = "html/admin/docs.html")]
+pub struct AdminDocsHtml<'a> {
+ pub csrf_token: &'a str,
+ pub data: &'a str,
+ pub action: &'a str,
+ pub col_act1: &'a str,
+ pub col_act1a: &'a str,
+ pub col_act2: &'a str,
+ pub col_act2a: &'a str,
+ pub col_acnt: &'a str,
+ pub col_acnta: &'a str,
+ pub col_ok: &'a str,
+ pub col_err: &'a str,
+ pub col_glow: &'a str,
+ pub col_gmid: &'a str,
+ pub col_ghigh: &'a str,
+ pub col_text: &'a str,
+ pub col_bg: &'a str,
+ pub nonce: &'a str,
+}
+
+impl AdminDocsHtml<'_> {
+ pub fn build(colors: &Colors) -> (String, String) {
+ let nonce = nonce();
+
+ let res = AdminDocsHtml {
+ col_act1: &colors.act1,
+ col_act1a: &colors.act1a,
+ col_act2: &colors.act2,
+ col_act2a: &colors.act2a,
+ col_acnt: &colors.acnt,
+ col_acnta: &colors.acnta,
+ col_ok: &colors.ok,
+ col_err: &colors.err,
+ col_glow: &colors.glow,
+ col_gmid: &colors.gmid,
+ col_ghigh: &colors.ghigh,
+ col_text: &colors.text,
+ col_bg: &colors.bg,
+ nonce: &nonce,
+ ..Default::default()
+ };
+
+ (res.render().unwrap(), nonce)
+ }
+}
+
+#[derive(Default, Template)]
+#[template(path = "html/admin/groups.html")]
+pub struct AdminGroupsHtml<'a> {
+ pub csrf_token: &'a str,
+ pub data: &'a str,
+ pub action: &'a str,
+ pub col_act1: &'a str,
+ pub col_act1a: &'a str,
+ pub col_act2: &'a str,
+ pub col_act2a: &'a str,
+ pub col_acnt: &'a str,
+ pub col_acnta: &'a str,
+ pub col_ok: &'a str,
+ pub col_err: &'a str,
+ pub col_glow: &'a str,
+ pub col_gmid: &'a str,
+ pub col_ghigh: &'a str,
+ pub col_text: &'a str,
+ pub col_bg: &'a str,
+ pub nonce: &'a str,
+}
+
+impl AdminGroupsHtml<'_> {
+ pub fn build(colors: &Colors) -> (String, String) {
+ let nonce = nonce();
+
+ let res = AdminGroupsHtml {
+ col_act1: &colors.act1,
+ col_act1a: &colors.act1a,
+ col_act2: &colors.act2,
+ col_act2a: &colors.act2a,
+ col_acnt: &colors.acnt,
+ col_acnta: &colors.acnta,
+ col_ok: &colors.ok,
+ col_err: &colors.err,
+ col_glow: &colors.glow,
+ col_gmid: &colors.gmid,
+ col_ghigh: &colors.ghigh,
+ col_text: &colors.text,
+ col_bg: &colors.bg,
+ nonce: &nonce,
+ ..Default::default()
+ };
+
+ (res.render().unwrap(), nonce)
+ }
+}
+
+#[derive(Default, Template)]
+#[template(path = "html/admin/roles.html")]
+pub struct AdminRolesHtml<'a> {
+ pub csrf_token: &'a str,
+ pub data: &'a str,
+ pub action: &'a str,
+ pub col_act1: &'a str,
+ pub col_act1a: &'a str,
+ pub col_act2: &'a str,
+ pub col_act2a: &'a str,
+ pub col_acnt: &'a str,
+ pub col_acnta: &'a str,
+ pub col_ok: &'a str,
+ pub col_err: &'a str,
+ pub col_glow: &'a str,
+ pub col_gmid: &'a str,
+ pub col_ghigh: &'a str,
+ pub col_text: &'a str,
+ pub col_bg: &'a str,
+ pub nonce: &'a str,
+}
+
+impl AdminRolesHtml<'_> {
+ pub fn build(colors: &Colors) -> (String, String) {
+ let nonce = nonce();
+
+ let res = AdminRolesHtml {
+ col_act1: &colors.act1,
+ col_act1a: &colors.act1a,
+ col_act2: &colors.act2,
+ col_act2a: &colors.act2a,
+ col_acnt: &colors.acnt,
+ col_acnta: &colors.acnta,
+ col_ok: &colors.ok,
+ col_err: &colors.err,
+ col_glow: &colors.glow,
+ col_gmid: &colors.gmid,
+ col_ghigh: &colors.ghigh,
+ col_text: &colors.text,
+ col_bg: &colors.bg,
+ nonce: &nonce,
+ ..Default::default()
+ };
+
+ (res.render().unwrap(), nonce)
+ }
+}
+
+#[derive(Default, Template)]
+#[template(path = "html/admin/scopes.html")]
+pub struct AdminScopesHtml<'a> {
+ pub csrf_token: &'a str,
+ pub data: &'a str,
+ pub action: &'a str,
+ pub col_act1: &'a str,
+ pub col_act1a: &'a str,
+ pub col_act2: &'a str,
+ pub col_act2a: &'a str,
+ pub col_acnt: &'a str,
+ pub col_acnta: &'a str,
+ pub col_ok: &'a str,
+ pub col_err: &'a str,
+ pub col_glow: &'a str,
+ pub col_gmid: &'a str,
+ pub col_ghigh: &'a str,
+ pub col_text: &'a str,
+ pub col_bg: &'a str,
+ pub nonce: &'a str,
+}
+
+impl AdminScopesHtml<'_> {
+ pub fn build(colors: &Colors) -> (String, String) {
+ let nonce = nonce();
+
+ let res = AdminScopesHtml {
+ col_act1: &colors.act1,
+ col_act1a: &colors.act1a,
+ col_act2: &colors.act2,
+ col_act2a: &colors.act2a,
+ col_acnt: &colors.acnt,
+ col_acnta: &colors.acnta,
+ col_ok: &colors.ok,
+ col_err: &colors.err,
+ col_glow: &colors.glow,
+ col_gmid: &colors.gmid,
+ col_ghigh: &colors.ghigh,
+ col_text: &colors.text,
+ col_bg: &colors.bg,
+ nonce: &nonce,
+ ..Default::default()
+ };
+
+ (res.render().unwrap(), nonce)
+ }
+}
+
+#[derive(Default, Template)]
+#[template(path = "html/admin/sessions.html")]
+pub struct AdminSessionsHtml<'a> {
+ pub csrf_token: &'a str,
+ pub data: &'a str,
+ pub action: &'a str,
+ pub col_act1: &'a str,
+ pub col_act1a: &'a str,
+ pub col_act2: &'a str,
+ pub col_act2a: &'a str,
+ pub col_acnt: &'a str,
+ pub col_acnta: &'a str,
+ pub col_ok: &'a str,
+ pub col_err: &'a str,
+ pub col_glow: &'a str,
+ pub col_gmid: &'a str,
+ pub col_ghigh: &'a str,
+ pub col_text: &'a str,
+ pub col_bg: &'a str,
+ pub nonce: &'a str,
+}
+
+impl AdminSessionsHtml<'_> {
+ pub fn build(colors: &Colors) -> (String, String) {
+ let nonce = nonce();
+
+ let res = AdminSessionsHtml {
+ col_act1: &colors.act1,
+ col_act1a: &colors.act1a,
+ col_act2: &colors.act2,
+ col_act2a: &colors.act2a,
+ col_acnt: &colors.acnt,
+ col_acnta: &colors.acnta,
+ col_ok: &colors.ok,
+ col_err: &colors.err,
+ col_glow: &colors.glow,
+ col_gmid: &colors.gmid,
+ col_ghigh: &colors.ghigh,
+ col_text: &colors.text,
+ col_bg: &colors.bg,
+ nonce: &nonce,
+ ..Default::default()
+ };
+
+ (res.render().unwrap(), nonce)
+ }
+}
+
+#[derive(Default, Template)]
+#[template(path = "html/admin/users.html")]
+pub struct AdminUsersHtml<'a> {
+ pub csrf_token: &'a str,
+ pub data: &'a str,
+ pub action: &'a str,
+ pub col_act1: &'a str,
+ pub col_act1a: &'a str,
+ pub col_act2: &'a str,
+ pub col_act2a: &'a str,
+ pub col_acnt: &'a str,
+ pub col_acnta: &'a str,
+ pub col_ok: &'a str,
+ pub col_err: &'a str,
+ pub col_glow: &'a str,
+ pub col_gmid: &'a str,
+ pub col_ghigh: &'a str,
+ pub col_text: &'a str,
+ pub col_bg: &'a str,
+ pub nonce: &'a str,
+}
+
+impl AdminUsersHtml<'_> {
+ pub fn build(colors: &Colors) -> (String, String) {
+ let nonce = nonce();
+
+ let res = AdminUsersHtml {
+ col_act1: &colors.act1,
+ col_act1a: &colors.act1a,
+ col_act2: &colors.act2,
+ col_act2a: &colors.act2a,
+ col_acnt: &colors.acnt,
+ col_acnta: &colors.acnta,
+ col_ok: &colors.ok,
+ col_err: &colors.err,
+ col_glow: &colors.glow,
+ col_gmid: &colors.gmid,
+ col_ghigh: &colors.ghigh,
+ col_text: &colors.text,
+ col_bg: &colors.bg,
+ nonce: &nonce,
+ ..Default::default()
+ };
+
+ (res.render().unwrap(), nonce)
+ }
+}
+
#[derive(Default, Template)]
#[template(path = "html/oidc/authorize.html")]
pub struct AuthorizeHtml<'a> {