Я отлаживаю в сборках ASP.NET Identity 2.x, с тех пор, как я называю подписанную на странице ASPX Webforms в веб -сайте ASP.NET. В этом исходном коде для подписания? Для меня это довольно сложно знать, какая линия кода удаляет автокект авто, так как моя идея удаления файла cookie - это просто истекать, за которым следует добавление его в объект ответа, и нигде в исходном коде выставки истек срок действия cookie.SignOut(string[] authenticationTypes)
< /code>
Метод в исходном коде, который затем вызывает < /p>
SignOut(AuthenticationProperties properties, string[] authenticationTypes)
< /code>
в том же исходном коде. Объект Prorgrant является нулевым, а также Priorrevoke является нулевым. Последняя строка, вызванная исходным кодом, является той, которая говорит < /p>
AuthenticationResponseRevoke = new AuthenticationResponseRevoke(authenticationTypes, properties)
< /code>
код на моей странице ASPX Webforms: < /p>
Context.GetOwinContext().Authentication.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
Исходный код, который визуальный студий 2022 принимает меня, когда вызов выше кода на моей странице называется (эти методы находятся в microsoft.owin.security.authenticationManager class)
public void SignOut(AuthenticationProperties properties, string[] authenticationTypes)
{
AuthenticationResponseGrant priorGrant = AuthenticationResponseGrant;
if (priorGrant != null)
{
// Scan the sign-in's and remove any with a matching auth type.
ClaimsIdentity[] filteredIdentities = priorGrant.Principal.Identities
.Where(identity => !authenticationTypes.Contains(identity.AuthenticationType, StringComparer.Ordinal))
.ToArray();
if (filteredIdentities.Length < priorGrant.Principal.Identities.Count())
{
if (filteredIdentities.Length == 0)
{
AuthenticationResponseGrant = null;
}
else
{
AuthenticationResponseGrant = new AuthenticationResponseGrant(new ClaimsPrincipal(filteredIdentities), priorGrant.Properties);
}
}
}
AuthenticationResponseRevoke priorRevoke = AuthenticationResponseRevoke;
if (priorRevoke == null)
{
AuthenticationResponseRevoke = new AuthenticationResponseRevoke(authenticationTypes, properties);
}
else
{
if (properties != null && !object.ReferenceEquals(properties.Dictionary, priorRevoke.Properties.Dictionary))
{
// Update prior properties
foreach (var propertiesPair in properties.Dictionary)
{
priorRevoke.Properties.Dictionary[propertiesPair.Key] = propertiesPair.Value;
}
}
// Cumulative auth types
string[] mergedAuthTypes = priorRevoke.AuthenticationTypes.Concat(authenticationTypes).ToArray();
AuthenticationResponseRevoke = new AuthenticationResponseRevoke(mergedAuthTypes, priorRevoke.Properties);
}
}
public void SignOut(string[] authenticationTypes)
{
SignOut(new AuthenticationProperties(), authenticationTypes);
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... ie-removed
Где в этом исходном коде идентификации ASP.NET устранен аудиторический файл cookie? ⇐ C#
Место общения программистов C#
1756386994
Anonymous
Я отлаживаю в сборках ASP.NET Identity 2.x, с тех пор, как я называю подписанную на странице ASPX Webforms в веб -сайте ASP.NET. В этом исходном коде для подписания? Для меня это довольно сложно знать, какая линия кода удаляет автокект авто, так как моя идея удаления файла cookie - это просто истекать, за которым следует добавление его в объект ответа, и нигде в исходном коде выставки истек срок действия cookie.SignOut(string[] authenticationTypes)
< /code>
Метод в исходном коде, который затем вызывает < /p>
SignOut(AuthenticationProperties properties, string[] authenticationTypes)
< /code>
в том же исходном коде. Объект Prorgrant является нулевым, а также Priorrevoke является нулевым. Последняя строка, вызванная исходным кодом, является той, которая говорит < /p>
AuthenticationResponseRevoke = new AuthenticationResponseRevoke(authenticationTypes, properties)
< /code>
код на моей странице ASPX Webforms: < /p>
Context.GetOwinContext().Authentication.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
Исходный код, который визуальный студий 2022 принимает меня, когда вызов выше кода на моей странице называется (эти методы находятся в microsoft.owin.security.authenticationManager class)
public void SignOut(AuthenticationProperties properties, string[] authenticationTypes)
{
AuthenticationResponseGrant priorGrant = AuthenticationResponseGrant;
if (priorGrant != null)
{
// Scan the sign-in's and remove any with a matching auth type.
ClaimsIdentity[] filteredIdentities = priorGrant.Principal.Identities
.Where(identity => !authenticationTypes.Contains(identity.AuthenticationType, StringComparer.Ordinal))
.ToArray();
if (filteredIdentities.Length < priorGrant.Principal.Identities.Count())
{
if (filteredIdentities.Length == 0)
{
AuthenticationResponseGrant = null;
}
else
{
AuthenticationResponseGrant = new AuthenticationResponseGrant(new ClaimsPrincipal(filteredIdentities), priorGrant.Properties);
}
}
}
AuthenticationResponseRevoke priorRevoke = AuthenticationResponseRevoke;
if (priorRevoke == null)
{
AuthenticationResponseRevoke = new AuthenticationResponseRevoke(authenticationTypes, properties);
}
else
{
if (properties != null && !object.ReferenceEquals(properties.Dictionary, priorRevoke.Properties.Dictionary))
{
// Update prior properties
foreach (var propertiesPair in properties.Dictionary)
{
priorRevoke.Properties.Dictionary[propertiesPair.Key] = propertiesPair.Value;
}
}
// Cumulative auth types
string[] mergedAuthTypes = priorRevoke.AuthenticationTypes.Concat(authenticationTypes).ToArray();
AuthenticationResponseRevoke = new AuthenticationResponseRevoke(mergedAuthTypes, priorRevoke.Properties);
}
}
public void SignOut(string[] authenticationTypes)
{
SignOut(new AuthenticationProperties(), authenticationTypes);
}
Подробнее здесь: [url]https://stackoverflow.com/questions/79748880/where-in-this-asp-net-identity-source-code-is-the-auth-cookie-removed[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия