velocia 0.3.0

velocia – production-ready AI agent framework using ADK-Rust, A2A protocol, and AWS DynamoDB
use async_trait::async_trait;
use axum::http::HeaderMap;

use crate::config::auth::SecurityScheme;
use crate::error::Result;

use super::strategy::AuthStrategy;

/// Pass-through strategy: all requests are allowed.
pub struct NoAuthCredentialService;

#[async_trait]
impl AuthStrategy for NoAuthCredentialService {
    async fn get_keys(&self, _scheme: &SecurityScheme) -> Result<serde_json::Value> {
        Ok(serde_json::Value::Null)
    }

    fn get_token(&self, _headers: &HeaderMap) -> Result<String> {
        Ok(String::new())
    }

    fn validate_token(&self, _token: &str, _keys: &serde_json::Value) -> Result<serde_json::Value> {
        Ok(serde_json::Value::Object(Default::default()))
    }
}