Skip to content
Snippets Groups Projects
Verified Commit 914f69c1 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

[PAM] Remove unnecessary reqwest error checks

It seems all 4xx errors are pushed into ServerResponse
parent 7b36fe48
No related branches found
No related tags found
No related merge requests found
......@@ -85,13 +85,8 @@ fn do_legacy_auth(username: String, password: String, config: Config) -> Result<
Err(e) => match e {
RequestTokenError::Request(re) => match re {
reqwest::Error::Reqwest(ree) => {
if ree.is_status() {
error!("Authentication failed for invalid grant: {}", ree);
return Err(PamError::AUTH_ERR);
} else {
error!("Request error requesting token: {}", ree);
return Err(PamError::AUTHINFO_UNAVAIL);
}
error!("Request error requesting token: {}", ree);
return Err(PamError::AUTHINFO_UNAVAIL);
},
reqwest::Error::Http(he) => {
error!("HTTP error requesting token: {}", he);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment