pub struct Gitlab;Expand description
GitLab’s scheme: header X-Gitlab-Token carrying the shared secret
verbatim. Exactly SharedTokenScheme with that header fixed.
Trait Implementations§
impl Copy for Gitlab
Source§impl SignatureScheme for Gitlab
impl SignatureScheme for Gitlab
Source§fn extract(&self, headers: &HeaderMap, body: &[u8]) -> Option<SignedDelivery>
fn extract(&self, headers: &HeaderMap, body: &[u8]) -> Option<SignedDelivery>
Reads one delivery’s signature material out of the request headers
and the raw body bytes.
None on any input the scheme cannot fully
read; an empty candidate list counts as unreadable.Source§fn expected_signature(&self, key: &[u8], signed_payload: &[u8]) -> Vec<u8> ⓘ
fn expected_signature(&self, key: &[u8], signed_payload: &[u8]) -> Vec<u8> ⓘ
The signature bytes a matching delivery must carry, given the
derived
key and the bytes the scheme signed. The default is
HMAC(self.digest(), key, signed_payload); a shared-token scheme
overrides this to return the key’s own bytes, because for it the
header is the secret and there is nothing to compute. Read moreAuto Trait Implementations§
impl Freeze for Gitlab
impl RefUnwindSafe for Gitlab
impl Send for Gitlab
impl Sync for Gitlab
impl Unpin for Gitlab
impl UnsafeUnpin for Gitlab
impl UnwindSafe for Gitlab
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