在前一篇簡單操作了Keycloak admin上的功能
新增了 realm、client、user
接著這篇會先基於 Authorization code flow 跟 net8 做串接
在前一篇簡單操作了Keycloak admin上的功能
新增了 realm、client、user
接著這篇會先基於 Authorization code flow 跟 net8 做串接
玩起來有點像是以前碰過的IdentityService
不需要自己實現驗證/授權相關的實做邏輯,交給他就行了!
不過 Keycloak 跟 IdentityService 不同的是他不需要依附在.net身上
作為一個獨立的服務,並且提供更完整的功能
這篇主要會把官方的介紹,濃縮一些認為重要的內容帶進來
以及照著官方的練習跟著實做
不需要將資料查詢回來, 就可以透過 Entry 更新完整或部份資料
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.)
---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
簡單設定 NLog.config, 即可將log一併紀錄到CloudWatch
原本在 Asp.Net Mvc中可以使用 ${appsetting} 取得設定值,但在 Asp.Net Core 中卻無法使用
寫 SideProejct 剛好有資料庫的需求,Heroku 有提供免費的 PostgreSQL 方案可以使用.
為 api 加上 attribute, 設定快取類型
透過EF直接查詢現有的資料庫,而非走完整的Code First流程(Add Migration, update database…),故資料庫內不存在Table [__MigrationHistory],但執行查詢時記錄到的Log卻會發現EF會嘗試的查詢它並發生錯誤...