This commit is contained in:
2025-11-05 23:01:42 +01:00
parent c193b30c8e
commit 911051e75d
11 changed files with 275 additions and 68 deletions
+2 -1
View File
@@ -37,7 +37,8 @@ pub fn create_api_token(
expires_at: Option<NaiveDateTime>,
capability_set_id: Uuid,
) -> Result<IssuedApiToken, AppError> {
let capability_set = validate_capability_set_belongs_to_tenant(conn, capability_set_id, tenant_id)?;
let capability_set =
validate_capability_set_belongs_to_tenant(conn, capability_set_id, tenant_id)?;
let raw_secret = generate_secret()?;
let token_prefix = raw_secret[..TOKEN_PREFIX_LENGTH].to_string();