shrike 0.1.0

AT Protocol library for Rust
Documentation
// Code generated by lexgen. DO NOT EDIT.

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ServerGetServiceAuthParams {
    pub aud: String,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub exp: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lxm: Option<String>,
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ServerGetServiceAuthOutput {
    pub token: String,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// ServerGetServiceAuth — Get a signed token on behalf of the requesting DID for the requested service.
pub async fn server_get_service_auth(
    client: &crate::xrpc::Client,
    params: &ServerGetServiceAuthParams,
) -> Result<ServerGetServiceAuthOutput, crate::xrpc::Error> {
    client
        .query("com.atproto.server.getServiceAuth", params)
        .await
}