soph-auth 0.27.1

The RUST Framework for Web Rustceans.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{async_trait, config, Auth};
use soph_config::support::config;
use soph_core::{error::ContainerError, support::Container, traits::InstanceTrait, Result};

#[async_trait]
impl InstanceTrait for Auth {
    type Config = config::Auth;

    async fn register(_: &Container) -> Result<Self, ContainerError>
    where
        Self: Sized,
    {
        let config = config().parse::<Self::Config>()?;

        Ok(Self::new(config))
    }
}