process_auth

Function process_auth 

Source
pub async fn process_auth(
    path: &str,
    token_str: Option<String>,
    config: &PathAuthConfig,
    manager: &SaTokenManager,
) -> AuthResult
Expand description

Process authentication for a request path 处理请求路径的鉴权

This function checks if the path requires authentication, validates the token, and returns an AuthResult with all relevant information. 此函数检查路径是否需要鉴权,验证token,并返回包含所有相关信息的AuthResult。

§Arguments

  • path: The request path
  • token_str: Optional token string from request
  • config: Path authentication configuration
  • manager: SaTokenManager instance