| 72 | /// Identifies a user. |
| 73 | #[derive(Debug, Clone, Serialize)] |
| 74 | pub struct User { |
| 75 | /// The name of the user within the system. |
| 76 | pub name: String, |
| 77 | /// Metadata about this user in an external system. |
| 78 | pub external_metadata: Option<ExternalUserMetadata>, |
| 79 | /// Metadata about this user stored in the catalog, |
| 80 | /// such as its role's `SUPERUSER` attribute. |
| 81 | pub internal_metadata: Option<InternalUserMetadata>, |
| 82 | /// The authenticator that authenticated this user. |
| 83 | /// If `None`, the user hasn't been authenticated. |
| 84 | pub authenticator_kind: Option<AuthenticatorKind>, |
| 85 | /// Groups extracted from JWT claims during OIDC authentication. |
| 86 | /// None for non-OIDC connections or when the group claim is absent. |
| 87 | pub groups: Option<Vec<String>>, |
| 88 | } |
| 89 | |
| 90 | impl From<&User> for mz_pgwire_common::UserMetadata { |
| 91 | fn from(user: &User) -> mz_pgwire_common::UserMetadata { |
no outgoing calls