manas_authentication 0.1.0

This crate provides implementations of various http authentication schemes for solid storage resource servers and authorization servers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::marker::PhantomData;

use crate::common::{credentials::RequestCredentials, req_authenticator::RequestAuthenticator};

/// A basic implementation of [`RequestAuthenticator`], that
/// sets credentials as an typed extension in request.
#[derive(Debug)]
pub struct BasicRequestAuthenticator<C> {
    _phantom: PhantomData<fn(C)>,
}

impl<C: RequestCredentials> RequestAuthenticator for BasicRequestAuthenticator<C> {
    type Credentials = C;
}