cc-auth

Crates.iocc-auth
lib.rscc-auth
version0.2.2
sourcesrc
created_at2024-06-04 17:12:08.02079
updated_at2024-06-05 12:20:17.820251
descriptionSimple backend authorization system
homepage
repositoryhttps://github.com/markcda/cc-auth
max_upload_size
id1261775
size10,388
Klimenty Titov (markcda)

documentation

README

cc-auth

crates.io MIT licensed docs.rs

Simple backend authorization system.

Simple usage example

use bb8_redis::{RedisConnectionManager, bb8::Pool};
use cc_auth::{ApiToken, check_token};
use cc_utils::prelude::MResult;

pub async fn authorized_action(
  cacher: &Pool<RedisConnectionManager>,
  token: ApiToken,
) -> MResult<()> {
  let user_id = check_token(&token, cacher).await?;
  Ok(())
}
Commit count: 10

cargo fmt