[−][src]Struct slack_http_verifier::SlackHTTPVerifier
Verifies Slack http requests are signed by the given secret.
A convenience wrapper around SlackVerifier
.
Methods
impl SlackHTTPVerifier
[src]
pub fn new<S: AsRef<[u8]>>(secret: S) -> Result<Self, InvalidKeyLengthError>
[src]
Returns a new SlackHTTPVerifier.
ⓘThis code runs with edition 2018
let verifier = SlackHTTPVerifier::new("8f742231b10e8888abcd99yyyzzz85a5").unwrap();
pub fn verify<T>(&self, req: &Request<T>) -> Result<(), VerificationError> where
T: AsRef<str>,
[src]
T: AsRef<str>,
Verifies the given request.
ⓘThis code runs with edition 2018
assert!(verifier.verify(&req).is_ok())
Trait Implementations
impl Clone for SlackHTTPVerifier
[src]
fn clone(&self) -> SlackHTTPVerifier
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SlackHTTPVerifier
[src]
impl Send for SlackHTTPVerifier
[src]
impl Sync for SlackHTTPVerifier
[src]
Auto Trait Implementations
impl RefUnwindSafe for SlackHTTPVerifier
impl Unpin for SlackHTTPVerifier
impl UnwindSafe for SlackHTTPVerifier
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,