- Created SelfFreezoneClient in Self components
- Wraps SDK FreezoneScriptClient for Self-specific operations
- Implements send_verification_email method
- Uses Rhai script template for email verification
- Includes template variable substitution
- Added serde-wasm-bindgen dependency
Usage:
let client = SelfFreezoneClient::builder()
.supervisor_url("http://localhost:8080")
.secret("my-secret")
.build()?;
client.send_verification_email(
"user@example.com",
"123456",
"https://verify.com/abc"
).await?;
28 lines
632 B
TOML
28 lines
632 B
TOML
[package]
|
|
name = "self-server"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[[bin]]
|
|
name = "server"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
tokio = { version = "1.0", features = ["full"] }
|
|
axum = "0.7"
|
|
tower = "0.4"
|
|
tower-http = { version = "0.5", features = ["cors", "fs"] }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
uuid = { version = "1.0", features = ["v4"] }
|
|
lettre = "0.11"
|
|
tokio-stream = { version = "0.1", features = ["sync"] }
|
|
futures-util = "0.3"
|
|
async-stream = "0.3"
|
|
tracing = "0.1"
|
|
tracing-subscriber = "0.3"
|
|
anyhow = "1.0"
|
|
clap = { version = "4.0", features = ["derive"] }
|
|
jsonwebtoken = "9.0"
|
|
base64 = "0.22"
|