Security: #211 - Request configuration refresh for some exception types.

This commit is contained in:
Chris Ross 2014-06-05 11:08:46 -07:00
Родитель 83dec6b737
Коммит d0fbf8fc45
2 изменённых файлов: 9 добавлений и 10 удалений

Просмотреть файл

@ -354,13 +354,12 @@ namespace Microsoft.Owin.Security.OpenIdConnect
{
_logger.WriteError("Exception occurred while processing message: '" + authFailedEx.ToString());
/* TODO:
if (authFailedEx.GetType().Equals(typeof(Secu)))
// Refresh the configuration for exceptions that may be caused by key rollovers. The user can also request a refresh in the notification.
if (authFailedEx.SourceException.GetType().Equals(typeof(SecurityTokenSignatureKeyNotFoundException)))
{
Options.MetadataManager.RequestRefresh();
Options.ConfigurationManager.RequestRefresh();
}
*/
// Post preview release: user can update metadata, need consistent messaging.
var authenticationFailedNotification = new AuthenticationFailedNotification<OpenIdConnectMessage, OpenIdConnectAuthenticationOptions>(Context, Options)
{
ProtocolMessage = openIdConnectMessage,

Просмотреть файл

@ -317,13 +317,12 @@ namespace Microsoft.Owin.Security.WsFederation
{
_logger.WriteError("Exception occurred while processing message: ", authFailedEx.SourceException);
/* TODO:
if (authFailedEx.GetType().Equals(typeof(Secu)))
// Refresh the configuration for exceptions that may be caused by key rollovers. The user can also request a refresh in the notification.
if (authFailedEx.SourceException.GetType().Equals(typeof(SecurityTokenSignatureKeyNotFoundException)))
{
Options.MetadataManager.RequestRefresh();
Options.ConfigurationManager.RequestRefresh();
}
*/
// Post preview release: user can update metadata, need consistent messaging.
var authenticationFailedNotification = new AuthenticationFailedNotification<WsFederationMessage, WsFederationAuthenticationOptions>(Context, Options)
{
ProtocolMessage = wsFederationMessage,
@ -339,6 +338,7 @@ namespace Microsoft.Owin.Security.WsFederation
{
return null;
}
authFailedEx.Throw();
}
}