Token cache serialization Azure AD

Modern authentication with Azure AD for WinForms (native) apps (cmatskas.com)

At this point everything should resolve fine apart from the 'TokenCacheHelper'. That's a special class that we will use to cache our token info locally and avoid prompting the user to login every time!

 

A custom serialization is needed on .NET Framework and .NET Core

In the case of .NET Framework and .NET core, the libraries also provide a default cache but this only lasts for the duration of the application. To understand why, remember that ADAL .NET desktop/core applications can be Web applications or Web API, which might use some specific cache mechanisms like databases, a Redis cache, etc .... To have a persistent token cache application in .NET Desktop or Core developers need to customize the serialization. The way to do it is different for public client applications and confidential client applications.

作者:Chuck Lu    GitHub    
posted @   ChuckLu  阅读(14)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2021-02-23 gpg Sign your git commits with tortoise git on windows
2021-02-23 Github在双因子验证的时候Country- code 没有中国区的解决办法
2020-02-23 HearthBuddy调试 不知道使用大漩涡传送门
2019-02-23 Glossary
2018-02-23 Bootstrap 导航元素
2017-02-23 Innosetup
2017-02-23 重定向
点击右上角即可分享
微信分享提示