Telegram Group & Telegram Channel
🔐 AuthenticationProperties в ASP.NET Core — недооценённый, но важный механизм

Если вы используете куки или OpenID Connect в ASP.NET Core, то наверняка сталкивались с объектом AuthenticationProperties. Он не просто "дополнительные параметры" — это мощный инструмент управления поведением аутентификации.

💡 Что можно сделать с AuthenticationProperties:

Установить срок действия куки:

new AuthenticationProperties { ExpiresUtc = DateTimeOffset.UtcNow.AddHours(1) }


↩️ Указать URL возврата после логина:


new AuthenticationProperties { RedirectUri = "/dashboard" }


🧭 Добавить временные метки, элементы состояния, флаги:
Например, IsPersistent, IssuedUtc, AllowRefresh, и кастомные значения.

🧠 Используется в:

HttpContext.SignInAsync(...)

ChallengeAsync(...) для OIDC

редиректах после логина/логаута

🛠️ Это ключевой объект, если вы хотите более гибко управлять логикой входа, выхода и жизненным циклом сессии в ASP.NET Core.

📎 Полный разбор:
https://blog.duendesoftware.com/posts/20250527-the-role-of-authenticationproperties-in-aspnet-core

@csharp_ci



tg-me.com/csharp_ci/1391
Create:
Last Update:

🔐 AuthenticationProperties в ASP.NET Core — недооценённый, но важный механизм

Если вы используете куки или OpenID Connect в ASP.NET Core, то наверняка сталкивались с объектом AuthenticationProperties. Он не просто "дополнительные параметры" — это мощный инструмент управления поведением аутентификации.

💡 Что можно сделать с AuthenticationProperties:

Установить срок действия куки:


new AuthenticationProperties { ExpiresUtc = DateTimeOffset.UtcNow.AddHours(1) }


↩️ Указать URL возврата после логина:


new AuthenticationProperties { RedirectUri = "/dashboard" }


🧭 Добавить временные метки, элементы состояния, флаги:
Например, IsPersistent, IssuedUtc, AllowRefresh, и кастомные значения.

🧠 Используется в:

HttpContext.SignInAsync(...)

ChallengeAsync(...) для OIDC

редиректах после логина/логаута

🛠️ Это ключевой объект, если вы хотите более гибко управлять логикой входа, выхода и жизненным циклом сессии в ASP.NET Core.

📎 Полный разбор:
https://blog.duendesoftware.com/posts/20250527-the-role-of-authenticationproperties-in-aspnet-core

@csharp_ci

BY C# (C Sharp) programming




Share with your friend now:
tg-me.com/csharp_ci/1391

View MORE
Open in Telegram


C C Sharp programming Telegram | DID YOU KNOW?

Date: |

Telegram hopes to raise $1bn with a convertible bond private placement

The super secure UAE-based Telegram messenger service, developed by Russian-born software icon Pavel Durov, is looking to raise $1bn through a bond placement to a limited number of investors from Russia, Europe, Asia and the Middle East, the Kommersant daily reported citing unnamed sources on February 18, 2021.The issue reportedly comprises exchange bonds that could be converted into equity in the messaging service that is currently 100% owned by Durov and his brother Nikolai.Kommersant reports that the price of the conversion would be at a 10% discount to a potential IPO should it happen within five years.The minimum bond placement is said to be set at $50mn, but could be lowered to $10mn. Five-year bonds could carry an annual coupon of 7-8%.

Should I buy bitcoin?

“To the extent it is used I fear it’s often for illicit finance. It’s an extremely inefficient way of conducting transactions, and the amount of energy that’s consumed in processing those transactions is staggering,” the former Fed chairwoman said. Yellen’s comments have been cited as a reason for bitcoin’s recent losses. However, Yellen’s assessment of bitcoin as a inefficient medium of exchange is an important point and one that has already been raised in the past by bitcoin bulls. Using a volatile asset in exchange for goods and services makes little sense if the asset can tumble 10% in a day, or surge 80% over the course of a two months as bitcoin has done in 2021, critics argue. To put a finer point on it, over the past 12 months bitcoin has registered 8 corrections, defined as a decline from a recent peak of at least 10% but not more than 20%, and two bear markets, which are defined as falls of 20% or more, according to Dow Jones Market Data.

C C Sharp programming from tw


Telegram C# (C Sharp) programming
FROM USA