Lines Matching full:session
41 const persistent_data::UserSession& session) in fillSessionObject() argument
43 res.jsonValue["Id"] = session.uniqueId; in fillSessionObject()
44 res.jsonValue["UserName"] = session.username; in fillSessionObject()
46 roles.emplace_back(redfish::getRoleIdFromPrivilege(session.userRole)); in fillSessionObject()
49 "/redfish/v1/SessionService/Sessions/{}", session.uniqueId); in fillSessionObject()
50 res.jsonValue["@odata.type"] = "#Session.v1_7_0.Session"; in fillSessionObject()
51 res.jsonValue["Name"] = "User Session"; in fillSessionObject()
52 res.jsonValue["Description"] = "Manager User Session"; in fillSessionObject()
53 res.jsonValue["ClientOriginIPAddress"] = session.clientIp; in fillSessionObject()
54 if (session.clientId) in fillSessionObject()
56 res.jsonValue["Context"] = *session.clientId; in fillSessionObject()
71 "</redfish/v1/JsonSchemas/Session/Session.json>; rel=describedby"); in handleSessionHead()
85 "</redfish/v1/JsonSchemas/Session/Session.json>; rel=describedby"); in handleSessionGet()
88 auto session = in handleSessionGet() local
91 if (session == nullptr) in handleSessionGet()
93 messages::resourceNotFound(asyncResp->res, "Session", sessionId); in handleSessionGet()
97 fillSessionObject(asyncResp->res, *session); in handleSessionGet()
109 auto session = in handleSessionDelete() local
112 if (session == nullptr) in handleSessionDelete()
114 messages::resourceNotFound(asyncResp->res, "Session", sessionId); in handleSessionDelete()
119 // session is being used to DELETE some other user's session, in handleSessionDelete()
123 if (req.session != nullptr && !session->username.empty() && in handleSessionDelete()
124 session->username != req.session->username) in handleSessionDelete()
127 redfish::getUserPrivileges(*req.session); in handleSessionDelete()
136 if (req.session != nullptr && req.session->uniqueId == sessionId && in handleSessionDelete()
137 session->cookieAuth) in handleSessionDelete()
142 persistent_data::SessionStore::getInstance().removeSession(session); in handleSessionDelete()
153 nlohmann::json::object_t session; in getSessionCollectionMembers() local
154 session["@odata.id"] = in getSessionCollectionMembers()
156 ret.emplace_back(std::move(session)); in getSessionCollectionMembers()
193 asyncResp->res.jsonValue["Name"] = "Session Collection"; in handleSessionCollectionGet()
194 asyncResp->res.jsonValue["Description"] = "Session Collection"; in handleSessionCollectionGet()
200 std::shared_ptr<persistent_data::UserSession>& session) in processAfterSessionCreation() argument
202 // When session is created by webui-vue give it session cookies as a in processAfterSessionCreation()
207 bmcweb::setSessionCookies(asyncResp->res, *session); in processAfterSessionCreation()
211 asyncResp->res.addHeader("X-Auth-Token", session->sessionToken); in processAfterSessionCreation()
215 "Location", "/redfish/v1/SessionService/Sessions/" + session->uniqueId); in processAfterSessionCreation()
217 if (session->isConfigureSelfOnly) in processAfterSessionCreation()
220 "/redfish/v1/AccountService/Accounts/{}", session->username); in processAfterSessionCreation()
225 crow::getUserInfo(asyncResp, username, session, [asyncResp, session]() { in processAfterSessionCreation()
226 fillSessionObject(asyncResp->res, *session); in processAfterSessionCreation()
277 // User is authenticated - create session in handleSessionCollectionPost()
278 std::shared_ptr<persistent_data::UserSession> session = in handleSessionCollectionPost() local
281 persistent_data::SessionType::Session, isConfigureSelfOnly); in handleSessionCollectionPost()
282 if (session == nullptr) in handleSessionCollectionPost()
287 processAfterSessionCreation(asyncResp, req, username, session); in handleSessionCollectionPost()
318 asyncResp->res.jsonValue["Name"] = "Session Service"; in handleSessionServiceGet()
320 asyncResp->res.jsonValue["Description"] = "Session Service"; in handleSessionServiceGet()
348 // The minimum & maximum allowed values for session timeout in handleSessionServicePatch()
350 // session service schema mentioned at in handleSessionServicePatch()