pub struct PathValidator {
pub raw_prefix_match: bool,
}Expand description
The default validator: permission check + path-prefix check.
A request is allowed when the token is not expired
(TokenClaims::exp), carries the Permission required by action,
and the requested path starts with one of allowed_paths.
Paths are compared on a segment boundary: allowed_paths = ["/docs"]
matches /docs, /docs/a.txt and /docs/ but not /docshop/x.
The root prefix "/" (or "") grants access to the whole tree. An
empty allowed_paths list denies everything.
Fields§
§raw_prefix_match: boolWhen true, allowed_paths are treated as raw string prefixes with
no segment-boundary normalization. Defaults to false.
Implementations§
Source§impl PathValidator
impl PathValidator
Trait Implementations§
Source§impl Clone for PathValidator
impl Clone for PathValidator
Source§impl Debug for PathValidator
impl Debug for PathValidator
Source§impl Default for PathValidator
impl Default for PathValidator
Auto Trait Implementations§
impl Freeze for PathValidator
impl RefUnwindSafe for PathValidator
impl Send for PathValidator
impl Sync for PathValidator
impl Unpin for PathValidator
impl UnsafeUnpin for PathValidator
impl UnwindSafe for PathValidator
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