Skip to content

Commit

Permalink
Web管理介面: SASL登入成功後,提供ExtInfo=額外訊息,可取得密碼有效日,最後登入位置...等訊息.
Browse files Browse the repository at this point in the history
  • Loading branch information
fonwin committed Jun 6, 2024
1 parent 3bad3ad commit 542efa0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fon9/web/WebSocketAuther.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 69,8 @@ void WebSocketAuther::OnAuthVerify(auth::AuthR authr, auth::AuthSessionSP authSe
// 因此, 會回到 device op thread, 處理後續的傳送, 因此 log 可能會有 "Async.DeviceContinueSend" 的訊息.
authSession->GetAuthResult().UpdateRoleConfig();
if (WebSocketSP ws = pthis->Owner_->CreateWebSocketService(dev, authSession->GetAuthResult())) {
pthis->Send(WebSocketOpCode::TextFrame, &authr.Info_);
// ExtInfo 提供的額外訊息可參考 UserMgr.cpp
pthis->Send(WebSocketOpCode::TextFrame, ToStrView(authr.Info_ ",ExtInfo=" authSession->GetAuthResult().ExtInfo_));
httpSession->UpgradeTo(std::move(ws));
}
else {
Expand Down

0 comments on commit 542efa0

Please sign in to comment.