Cookies, tokens and session lifetime with Identity Server
C# .NET

Cookies, tokens and session lifetime with Identity Server

When dealing with OpenID Connect (OIDC) and OAuth authentication in a modern .NET application, Identity Server is ofted used as the identity provider. In this post, I’ll work through a common, but quite specific scenario: configuring the lifetime of a client session. In this case, the user of an ASP.NET MVC Client must be logged out of the session after 15 minutes of inactivity. In such a setup, there are a lot of places where you can configure time-outs, lifetimes, expirations etc.

  • Daan Stolp
Een refactoring met gebruik van drie C# features
C# .NET Refactoring Clean Code

Een refactoring met gebruik van drie C# features

Soms zijn het maar kleine wijzigingen die je code net dat extra beetje cleaner kunnen maken. Een tijdje terug was ik bezig met het implementeren van caching. Hierbij schreef ik regelmatig code die controleert of data in de cache zit. Zo ja, dan wordt deze data teruggegeven. Zo nee, dan wordt de data opgehaald en in de cache geplaatst. De code ziet er steeds ongeveer zo uit: public SomeObject GetSomeObject() { string cacheKey = "SomeCacheKey"; SomeObject thingToCache; if (!

  • Daan Stolp