MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / new

Method new

crates/client-api/src/auth.rs:94–104  ·  view source on GitHub ↗
(creds: SpacetimeCreds, claims: SpacetimeIdentityClaims)

Source from the content-addressed store, hash-verified

92
93impl SpacetimeAuth {
94 pub fn new(creds: SpacetimeCreds, claims: SpacetimeIdentityClaims) -> Result<Self, anyhow::Error> {
95 let payload = creds
96 .extract_jwt_payload_string()
97 .ok_or_else(|| anyhow!("Failed to extract JWT payload"))?
98 .into_boxed_str();
99 Ok(Self {
100 creds,
101 claims,
102 jwt_payload: payload,
103 })
104 }
105}
106
107impl From<SpacetimeAuth> for ConnectionAuthCtx {

Callers

nothing calls this directly

Calls 2

OkFunction · 0.50

Tested by

no test coverage detected