use conjure_http::endpoint;
#[conjure_http::conjure_endpoints(
name = "InternalSandboxTokenService",
use_legacy_error_serialization
)]
pub trait InternalSandboxTokenService {
#[endpoint(
method = POST,
path = "/sandbox-token-internal/v1/issue",
name = "issueSandboxToken",
produces = conjure_http::server::StdResponseSerializer
)]
fn issue_sandbox_token(
&self,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::objects::authorization::IssueSandboxTokenRequest,
#[header(
name = "X-Nominal-Sandbox-Shared-Secret",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "sharedSecret"
)]
shared_secret: String,
) -> Result<
super::super::super::objects::authorization::IssueSandboxTokenResponse,
conjure_http::private::Error,
>;
}
#[conjure_http::conjure_endpoints(
name = "InternalSandboxTokenService",
use_legacy_error_serialization
)]
pub trait AsyncInternalSandboxTokenService {
#[endpoint(
method = POST,
path = "/sandbox-token-internal/v1/issue",
name = "issueSandboxToken",
produces = conjure_http::server::StdResponseSerializer
)]
async fn issue_sandbox_token(
&self,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::objects::authorization::IssueSandboxTokenRequest,
#[header(
name = "X-Nominal-Sandbox-Shared-Secret",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "sharedSecret"
)]
shared_secret: String,
) -> Result<
super::super::super::objects::authorization::IssueSandboxTokenResponse,
conjure_http::private::Error,
>;
}
#[conjure_http::conjure_endpoints(
name = "InternalSandboxTokenService",
use_legacy_error_serialization,
local
)]
pub trait LocalAsyncInternalSandboxTokenService {
#[endpoint(
method = POST,
path = "/sandbox-token-internal/v1/issue",
name = "issueSandboxToken",
produces = conjure_http::server::StdResponseSerializer
)]
async fn issue_sandbox_token(
&self,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::objects::authorization::IssueSandboxTokenRequest,
#[header(
name = "X-Nominal-Sandbox-Shared-Secret",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "sharedSecret"
)]
shared_secret: String,
) -> Result<
super::super::super::objects::authorization::IssueSandboxTokenResponse,
conjure_http::private::Error,
>;
}