diff --git a/src/rocket/introspection/guard.rs b/src/rocket/introspection/guard.rs index e8e5fd1..11d9c38 100644 --- a/src/rocket/introspection/guard.rs +++ b/src/rocket/introspection/guard.rs @@ -3,6 +3,7 @@ use openidconnect::TokenIntrospectionResponse; use rocket::http::Status; use rocket::request::{FromRequest, Outcome}; use rocket::{async_trait, Request}; +use std::collections::HashMap; use crate::oidc::introspection::{introspect, IntrospectionError, ZitadelIntrospectionResponse}; use crate::rocket::introspection::IntrospectionConfig; @@ -35,6 +36,8 @@ pub struct IntrospectedUser { pub email: Option, pub email_verified: Option, pub locale: Option, + pub project_roles: Option>>, + pub metadata: Option>, } impl From for IntrospectedUser { @@ -49,6 +52,8 @@ impl From for IntrospectedUser { email: response.extra_fields().email.clone(), email_verified: response.extra_fields().email_verified, locale: response.extra_fields().locale.clone(), + project_roles: response.extra_fields().project_roles.clone(), + metadata: response.extra_fields().metadata.clone(), } } }