authentication.hpp (bd79bce8c3f1deb1fb2773868b9ece25233cf27b) | authentication.hpp (2ccce1f3a04ab72824820a6795878ce01f37a22c) |
---|---|
1#pragma once 2 3#include "cookies.hpp" 4#include "forward_unauthorized.hpp" 5#include "http_request.hpp" 6#include "http_response.hpp" 7#include "http_utility.hpp" 8#include "pam_authenticate.hpp" --- 40 unchanged lines hidden (view full) --- 49 return nullptr; 50 } 51 std::string pass = authData.substr(separator); 52 53 BMCWEB_LOG_DEBUG("[AuthMiddleware] Authenticating user: {}", user); 54 BMCWEB_LOG_DEBUG("[AuthMiddleware] User IPAddress: {}", 55 clientIp.to_string()); 56 | 1#pragma once 2 3#include "cookies.hpp" 4#include "forward_unauthorized.hpp" 5#include "http_request.hpp" 6#include "http_response.hpp" 7#include "http_utility.hpp" 8#include "pam_authenticate.hpp" --- 40 unchanged lines hidden (view full) --- 49 return nullptr; 50 } 51 std::string pass = authData.substr(separator); 52 53 BMCWEB_LOG_DEBUG("[AuthMiddleware] Authenticating user: {}", user); 54 BMCWEB_LOG_DEBUG("[AuthMiddleware] User IPAddress: {}", 55 clientIp.to_string()); 56 |
57 int pamrc = pamAuthenticateUser(user, pass); | 57 int pamrc = pamAuthenticateUser(user, pass, std::nullopt); |
58 bool isConfigureSelfOnly = pamrc == PAM_NEW_AUTHTOK_REQD; 59 if ((pamrc != PAM_SUCCESS) && !isConfigureSelfOnly) 60 { 61 return nullptr; 62 } 63 64 // Attempt to locate an existing Basic Auth session from the same ip address 65 // and user --- 233 unchanged lines hidden --- | 58 bool isConfigureSelfOnly = pamrc == PAM_NEW_AUTHTOK_REQD; 59 if ((pamrc != PAM_SUCCESS) && !isConfigureSelfOnly) 60 { 61 return nullptr; 62 } 63 64 // Attempt to locate an existing Basic Auth session from the same ip address 65 // and user --- 233 unchanged lines hidden --- |