pub struct RelativePath(/* private fields */);Expand description
Post-login redirect target.
Newtype-enforced relative path — rejects any string parsing as an
absolute URL (scheme present), a protocol-relative URL (leading
//), or a non-rooted path (must start with /). Open-redirect
defense at the SDK boundary per RFC 9700 §4.1.5: the consumer’s
start_handler constructs a RelativePath from inbound user data,
and the type system prevents the consumer from passing through an
adversary-controlled absolute URL by accident.
ⓘ
use pas_external::oidc::RelativePath;
// From `&str` is fallible — direct assignment requires `?` or `unwrap`.
fn _compile_fail(_p: &RelativePath) {}
let _: RelativePath = "https://evil.com".into();Implementations§
Trait Implementations§
Source§impl Clone for RelativePath
impl Clone for RelativePath
Source§fn clone(&self) -> RelativePath
fn clone(&self) -> RelativePath
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 RelativePath
impl Debug for RelativePath
Source§impl Default for RelativePath
impl Default for RelativePath
Source§impl<'de> Deserialize<'de> for RelativePath
impl<'de> Deserialize<'de> for RelativePath
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RelativePath
impl PartialEq for RelativePath
Source§fn eq(&self, other: &RelativePath) -> bool
fn eq(&self, other: &RelativePath) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RelativePath
impl Serialize for RelativePath
Source§impl<'a> TryFrom<&'a str> for RelativePath
impl<'a> TryFrom<&'a str> for RelativePath
Source§impl TryFrom<String> for RelativePath
impl TryFrom<String> for RelativePath
impl Eq for RelativePath
impl StructuralPartialEq for RelativePath
Auto Trait Implementations§
impl Freeze for RelativePath
impl RefUnwindSafe for RelativePath
impl Send for RelativePath
impl Sync for RelativePath
impl Unpin for RelativePath
impl UnsafeUnpin for RelativePath
impl UnwindSafe for RelativePath
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