| Crates.io | cc-auth |
| lib.rs | cc-auth |
| version | 0.2.2 |
| created_at | 2024-06-04 17:12:08.02079+00 |
| updated_at | 2024-06-05 12:20:17.820251+00 |
| description | Simple backend authorization system |
| homepage | |
| repository | https://github.com/markcda/cc-auth |
| max_upload_size | |
| id | 1261775 |
| size | 10,388 |
Simple backend authorization system.
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(())
}