pub struct DenyResponse {
pub status: Option<u16>,
pub body: Option<String>,
pub headers: BTreeMap<String, String>,
}Expand description
Custom response to attach when a route’s policy denies (e.g., equivalent
to a Kuadrant AuthPolicy response.unauthorized denyWith).
Carried on the route and surfaced on the deny outcome’s
details map by the host (apl-cpex), so a host can render a custom
HTTP response. All fields optional; an absent block leaves the host’s
default denial response unchanged.
Fields§
§status: Option<u16>HTTP status to use for the denial (e.g. 403, 302).
body: Option<String>Response body.
headers: BTreeMap<String, String>Response headers (e.g. Location for a redirect, WWW-Authenticate).
Trait Implementations§
Source§impl Clone for DenyResponse
impl Clone for DenyResponse
Source§fn clone(&self) -> DenyResponse
fn clone(&self) -> DenyResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DenyResponse
impl Debug for DenyResponse
Source§impl Default for DenyResponse
impl Default for DenyResponse
Source§fn default() -> DenyResponse
fn default() -> DenyResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DenyResponse
impl<'de> Deserialize<'de> for DenyResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DenyResponse
impl PartialEq for DenyResponse
Source§impl Serialize for DenyResponse
impl Serialize for DenyResponse
impl StructuralPartialEq for DenyResponse
Auto Trait Implementations§
impl Freeze for DenyResponse
impl RefUnwindSafe for DenyResponse
impl Send for DenyResponse
impl Sync for DenyResponse
impl Unpin for DenyResponse
impl UnsafeUnpin for DenyResponse
impl UnwindSafe for DenyResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more