feat: complete Phase 0 Enterprise IAM

This commit is contained in:
thakares committed 2026-07-21 15:26:16 +05:30
1 parent 3d2d291006
commit c2f5ba3f54
202 files changed
+21371 -1360

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
import re
path = 'tests/integration_test.rs'
with open(path, 'r') as f:
content = f.read()
# Fix remaining `&pool` being passed to mock functions (accounting for newlines and whitespace)
content = re.sub(r'&\s*pool\s*,', '&provider,', content)
# Fix remaining `pool: &SqlitePool` in mock signatures
content = content.replace(
'pool: &SqlitePool',
'provider: &std::sync::Arc<dyn nx9_auth::db::provider::DatabaseProvider>'
)
# Fix revoke_token call which requires extra arguments now.
content = content.replace(
'nx9_auth::security::tokens::revoke_token(&provider, &token.id, /* Option<&str> */, /* Option<&str> */, /* Option<&str> */).await.unwrap();',
'provider.tokens().revoke(&token.id).await.unwrap();'
)
# Just in case my previous attempt didn't add the comments
content = content.replace(
'nx9_auth::security::tokens::revoke_token(&provider, &token.id).await.unwrap();',
'provider.tokens().revoke(&token.id).await.unwrap();'
)
with open(path, 'w') as f:
f.write(content)