pub enum MatchPolicy {
Strict,
GitLenient,
}Expand description
URL/method matching leniency for NIP-98 verification.
Strict (the default for every HTTP endpoint) demands an exact URL
and method match. GitLenient mirrors JSS git: a single static
http.extraHeader token has to cover the multi-request git smart
protocol (GET …/info/refs then POST …/git-receive-pack), so the
client signs method * and the repo base URL — the verifier accepts
a * method against any request and treats the token URL as a prefix
of the request URL. The signing pubkey is still cryptographically
verified; only the request-binding is relaxed.
Variants§
Strict
Exact URL + method binding. Default for all REST/MCP endpoints.
GitLenient
*-method wildcard + URL-prefix binding for the git push path.
Trait Implementations§
Source§impl Clone for MatchPolicy
impl Clone for MatchPolicy
Source§fn clone(&self) -> MatchPolicy
fn clone(&self) -> MatchPolicy
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 moreimpl Copy for MatchPolicy
Source§impl Debug for MatchPolicy
impl Debug for MatchPolicy
impl Eq for MatchPolicy
Source§impl PartialEq for MatchPolicy
impl PartialEq for MatchPolicy
Source§fn eq(&self, other: &MatchPolicy) -> bool
fn eq(&self, other: &MatchPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MatchPolicy
Auto Trait Implementations§
impl Freeze for MatchPolicy
impl RefUnwindSafe for MatchPolicy
impl Send for MatchPolicy
impl Sync for MatchPolicy
impl Unpin for MatchPolicy
impl UnsafeUnpin for MatchPolicy
impl UnwindSafe for MatchPolicy
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