(creds: SpacetimeCreds, claims: SpacetimeIdentityClaims)
| 92 | |
| 93 | impl 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 | |
| 107 | impl From<SpacetimeAuth> for ConnectionAuthCtx { |
nothing calls this directly
no test coverage detected