Skip to main content

nodedb_sql/ddl_ast/statement/
auth.rs

1// SPDX-License-Identifier: Apache-2.0
2
3/// One `WHEN <claim_name> = '<value>' SET ...` clause inside a
4/// `CREATE OIDC PROVIDER` or `ALTER OIDC PROVIDER` statement.
5#[derive(Debug, Clone, PartialEq, Eq)]
6pub struct OidcClaimMappingClause {
7    pub claim_name: String,
8    pub claim_value: String,
9    /// Optional default database ID to grant for matching tokens.
10    pub default_database: Option<u64>,
11    /// Additional database IDs accessible to matching tokens.
12    pub add_databases: Vec<u64>,
13    /// Role names to grant to matching tokens.
14    pub add_roles: Vec<String>,
15}