Polish authentication

This commit is contained in:
Kevin Yue
2024-04-04 18:31:48 +08:00
parent 1b1ce882a5
commit 29cfa9e24b
2 changed files with 31 additions and 21 deletions

View File

@@ -68,12 +68,12 @@ impl SamlAuthData {
if auth_data.starts_with("cas-as") {
info!("Got token auth data: {}", auth_data);
let token_cred: SamlAuthData = serde_urlencoded::from_str(auth_data).map_err(|e| {
let auth_data: SamlAuthData = serde_urlencoded::from_str(auth_data).map_err(|e| {
warn!("Failed to parse token auth data: {}", e);
AuthDataParseError::Invalid
})?;
Ok(token_cred)
Ok(auth_data)
} else {
info!("Parsing SAML auth data...");