Remove log codes from exception/log messages; don't localize logs
https://github.com/aspnet/Security/issues/414 and https://github.com/aspnet/Security/issues/418 Also started putting in event ids for logs.
This commit is contained in:
parent
c14119b612
commit
121e6891e7
|
|
@ -107,12 +107,12 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
await Options.Events.RedirectToEndSessionEndpoint(redirectContext);
|
||||
if (redirectContext.HandledResponse)
|
||||
{
|
||||
Logger.LogVerbose("RedirectToEndSessionEndpoint.HandledResponse");
|
||||
Logger.LogVerbose(1, "RedirectToEndSessionEndpoint.HandledResponse");
|
||||
return;
|
||||
}
|
||||
else if (redirectContext.Skipped)
|
||||
{
|
||||
Logger.LogVerbose("RedirectToEndSessionEndpoint.Skipped");
|
||||
Logger.LogVerbose(2, "RedirectToEndSessionEndpoint.Skipped");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
var redirectUri = message.CreateLogoutRequestUrl();
|
||||
if (!Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute))
|
||||
{
|
||||
Logger.LogWarning(Resources.OIDCH_0051_RedirectUriLogoutIsNotWellFormed, redirectUri);
|
||||
Logger.LogWarning(3, "The query string for Logout is not a well-formed URI. Redirect URI: '{0}'.", redirectUri);
|
||||
}
|
||||
|
||||
Response.Redirect(redirectUri);
|
||||
|
|
@ -170,7 +170,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
Logger.LogDebug(Resources.OIDCH_0026_ApplyResponseChallengeAsync, this.GetType());
|
||||
Logger.LogDebug(4, "Entering {0}." + nameof(HandleUnauthorizedAsync), GetType());
|
||||
|
||||
// order for local RedirectUri
|
||||
// 1. challenge.Properties.RedirectUri
|
||||
|
|
@ -181,7 +181,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
{
|
||||
properties.RedirectUri = CurrentUri;
|
||||
}
|
||||
Logger.LogDebug(Resources.OIDCH_0030_Using_Properties_RedirectUri, properties.RedirectUri);
|
||||
Logger.LogDebug(5, "Using properties.RedirectUri for 'local redirect' post authentication: '{0}'.", properties.RedirectUri);
|
||||
|
||||
if (_configuration == null && Options.ConfigurationManager != null)
|
||||
{
|
||||
|
|
@ -223,12 +223,12 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
await Options.Events.RedirectToAuthenticationEndpoint(redirectContext);
|
||||
if (redirectContext.HandledResponse)
|
||||
{
|
||||
Logger.LogVerbose("RedirectToAuthenticationEndpoint.HandledResponse");
|
||||
Logger.LogVerbose(6, "RedirectToAuthenticationEndpoint.HandledResponse");
|
||||
return true;
|
||||
}
|
||||
else if (redirectContext.Skipped)
|
||||
{
|
||||
Logger.LogVerbose("RedirectToAuthenticationEndpoint.Skipped");
|
||||
Logger.LogVerbose(7, "RedirectToAuthenticationEndpoint.Skipped");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -242,7 +242,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
var redirectUriForCode = message.RedirectUri;
|
||||
if (string.IsNullOrEmpty(redirectUriForCode))
|
||||
{
|
||||
Logger.LogDebug(Resources.OIDCH_0031_Using_Options_RedirectUri, Options.RedirectUri);
|
||||
Logger.LogDebug(8, "Using Options.RedirectUri for 'redirect_uri': '{0}'.", Options.RedirectUri);
|
||||
redirectUriForCode = Options.RedirectUri;
|
||||
}
|
||||
|
||||
|
|
@ -259,7 +259,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
var redirectUri = message.CreateAuthenticationRequestUrl();
|
||||
if (!Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute))
|
||||
{
|
||||
Logger.LogWarning(Resources.OIDCH_0036_UriIsNotWellFormed, redirectUri);
|
||||
Logger.LogWarning(9, "The redirect URI is not well-formed. The URI is: '{0}'.", redirectUri);
|
||||
}
|
||||
|
||||
Response.Redirect(redirectUri);
|
||||
|
|
@ -304,7 +304,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
/// <remarks>Uses log id's OIDCH-0000 - OIDCH-0025</remarks>
|
||||
protected override async Task<AuthenticateResult> HandleRemoteAuthenticateAsync()
|
||||
{
|
||||
Logger.LogDebug(Resources.OIDCH_0000_AuthenticateCoreAsync, this.GetType());
|
||||
Logger.LogDebug(10, "Entering: {0}." + nameof(HandleRemoteAuthenticateAsync), GetType());
|
||||
|
||||
OpenIdConnectMessage message = null;
|
||||
|
||||
|
|
@ -354,24 +354,24 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
if (string.IsNullOrEmpty(message.State))
|
||||
{
|
||||
// This wasn't a valid ODIC message, it may not have been intended for us.
|
||||
Logger.LogVerbose(Resources.OIDCH_0004_MessageStateIsNullOrEmpty);
|
||||
return AuthenticateResult.Failed(Resources.OIDCH_0004_MessageStateIsNullOrEmpty);
|
||||
Logger.LogVerbose(11, "message.State is null or empty.");
|
||||
return AuthenticateResult.Failed(Resources.MessageStateIsNullOrEmpty);
|
||||
}
|
||||
|
||||
// if state exists and we failed to 'unprotect' this is not a message we should process.
|
||||
var properties = Options.StateDataFormat.Unprotect(Uri.UnescapeDataString(message.State));
|
||||
if (properties == null)
|
||||
{
|
||||
Logger.LogError(Resources.OIDCH_0005_MessageStateIsInvalid);
|
||||
return AuthenticateResult.Failed(Resources.OIDCH_0005_MessageStateIsInvalid);
|
||||
Logger.LogError(12, "Unable to unprotect the message.State.");
|
||||
return AuthenticateResult.Failed(Resources.MessageStateIsInvalid);
|
||||
}
|
||||
|
||||
// if any of the error fields are set, throw error null
|
||||
if (!string.IsNullOrEmpty(message.Error))
|
||||
{
|
||||
// REVIEW: this error formatting is pretty nuts
|
||||
Logger.LogError(Resources.OIDCH_0006_MessageContainsError, message.Error, message.ErrorDescription ?? "ErrorDecription null", message.ErrorUri ?? "ErrorUri null");
|
||||
return AuthenticateResult.Failed(new OpenIdConnectProtocolException(string.Format(CultureInfo.InvariantCulture, Resources.OIDCH_0006_MessageContainsError, message.Error, message.ErrorDescription ?? "ErrorDecription null", message.ErrorUri ?? "ErrorUri null")));
|
||||
Logger.LogError(13, "Message contains error: '{0}', error_description: '{1}', error_uri: '{2}'.", message.Error, message.ErrorDescription ?? "ErrorDecription null", message.ErrorUri ?? "ErrorUri null");
|
||||
return AuthenticateResult.Failed(new OpenIdConnectProtocolException(string.Format(CultureInfo.InvariantCulture, Resources.MessageContainsError, message.Error, message.ErrorDescription ?? "ErrorDecription null", message.ErrorUri ?? "ErrorUri null")));
|
||||
}
|
||||
|
||||
string userstate = null;
|
||||
|
|
@ -385,11 +385,11 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
|
||||
if (_configuration == null && Options.ConfigurationManager != null)
|
||||
{
|
||||
Logger.LogVerbose(Resources.OIDCH_0007_UpdatingConfiguration);
|
||||
Logger.LogVerbose(14, "Updating configuration");
|
||||
_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
|
||||
}
|
||||
|
||||
Logger.LogDebug("Authorization response received.");
|
||||
Logger.LogDebug(15, "Authorization response received.");
|
||||
var authorizationResponseReceivedContext = new AuthorizationResponseReceivedContext(Context, Options)
|
||||
{
|
||||
ProtocolMessage = message,
|
||||
|
|
@ -398,12 +398,12 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
await Options.Events.AuthorizationResponseReceived(authorizationResponseReceivedContext);
|
||||
if (authorizationResponseReceivedContext.HandledResponse)
|
||||
{
|
||||
Logger.LogVerbose("AuthorizationResponseReceived.HandledResponse");
|
||||
Logger.LogVerbose(16, "AuthorizationResponseReceived.HandledResponse");
|
||||
return AuthenticateResult.Success(authorizationResponseReceivedContext.AuthenticationTicket);
|
||||
}
|
||||
else if (authorizationResponseReceivedContext.Skipped)
|
||||
{
|
||||
Logger.LogVerbose("AuthorizationResponseReceived.Skipped");
|
||||
Logger.LogVerbose(17, "AuthorizationResponseReceived.Skipped");
|
||||
return AuthenticateResult.Success(ticket: null);
|
||||
}
|
||||
message = authorizationResponseReceivedContext.ProtocolMessage;
|
||||
|
|
@ -419,20 +419,20 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
}
|
||||
else
|
||||
{
|
||||
Logger.LogDebug(Resources.OIDCH_0045_Id_Token_Code_Missing);
|
||||
return AuthenticateResult.Failed(Resources.OIDCH_0045_Id_Token_Code_Missing);
|
||||
Logger.LogDebug(18, "Cannot process the message. Both id_token and code are missing.");
|
||||
return AuthenticateResult.Failed(Resources.IdTokenCodeMissing);
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Logger.LogError(Resources.OIDCH_0017_ExceptionOccurredWhileProcessingMessage, exception);
|
||||
Logger.LogError(19, "Exception occurred while processing message.", exception);
|
||||
|
||||
// Refresh the configuration for exceptions that may be caused by key rollovers. The user can also request a refresh in the event.
|
||||
if (Options.RefreshOnIssuerKeyNotFound && exception.GetType().Equals(typeof(SecurityTokenSignatureKeyNotFoundException)))
|
||||
{
|
||||
if (Options.ConfigurationManager != null)
|
||||
{
|
||||
Logger.LogVerbose(Resources.OIDCH_0021_AutomaticConfigurationRefresh);
|
||||
Logger.LogVerbose(20, "exception of type 'SecurityTokenSignatureKeyNotFoundException' thrown, Options.ConfigurationManager.RequestRefresh() called.");
|
||||
Options.ConfigurationManager.RequestRefresh();
|
||||
}
|
||||
}
|
||||
|
|
@ -476,7 +476,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
var code = authorizationCodeReceivedContext.Code;
|
||||
|
||||
// Redeeming authorization code for tokens
|
||||
Logger.LogDebug(Resources.OIDCH_0038_Redeeming_Auth_Code, code);
|
||||
Logger.LogDebug(21, "Id Token is null. Redeeming code '{0}' for tokens.", code);
|
||||
|
||||
var tokenEndpointResponse = await RedeemAuthorizationCodeAsync(code, authorizationCodeReceivedContext.RedirectUri);
|
||||
|
||||
|
|
@ -532,7 +532,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
|
||||
if (Options.GetClaimsFromUserInfoEndpoint)
|
||||
{
|
||||
Logger.LogDebug(Resources.OIDCH_0040_Sending_Request_UIEndpoint);
|
||||
Logger.LogDebug(22, "Sending request to user info endpoint for retrieving claims.");
|
||||
ticket = await GetUserInformationAsync(tokenEndpointResponse.ProtocolMessage, jwt, ticket);
|
||||
}
|
||||
|
||||
|
|
@ -542,7 +542,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
// Implicit Flow or Hybrid Flow
|
||||
private async Task<AuthenticateResult> HandleIdTokenFlows(OpenIdConnectMessage message, AuthenticationProperties properties)
|
||||
{
|
||||
Logger.LogDebug(Resources.OIDCH_0020_IdTokenReceived, message.IdToken);
|
||||
Logger.LogDebug(23, "'id_token' received: '{0}'", message.IdToken);
|
||||
|
||||
JwtSecurityToken jwt = null;
|
||||
var validationParameters = Options.TokenValidationParameters.Clone();
|
||||
|
|
@ -650,7 +650,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
|
||||
if (string.IsNullOrEmpty(userInfoEndpoint))
|
||||
{
|
||||
Logger.LogWarning(Resources.OIDCH_0046_UserInfo_Endpoint_Not_Set);
|
||||
Logger.LogWarning(24, nameof(_configuration.UserInfoEndpoint) + " is not set. Request to retrieve claims cannot be completed.");
|
||||
return ticket;
|
||||
}
|
||||
|
||||
|
|
@ -826,7 +826,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogWarning("Failed to un-protect the nonce cookie.", ex);
|
||||
Logger.LogWarning(25, "Failed to un-protect the nonce cookie.", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -873,7 +873,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
correlationKey,
|
||||
out correlationId))
|
||||
{
|
||||
Logger.LogWarning("{0} state property not found.", correlationKey);
|
||||
Logger.LogWarning(26, "{0} state property not found.", correlationKey);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -884,7 +884,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
var correlationCookie = Request.Cookies[cookieName];
|
||||
if (string.IsNullOrEmpty(correlationCookie))
|
||||
{
|
||||
Logger.LogWarning("{0} cookie not found.", cookieName);
|
||||
Logger.LogWarning(27, "{0} cookie not found.", cookieName);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -897,7 +897,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
|
||||
if (!string.Equals(correlationCookie, NonceProperty, StringComparison.Ordinal))
|
||||
{
|
||||
Logger.LogWarning("{0} correlation cookie and state property mismatch.", correlationKey);
|
||||
Logger.LogWarning(28, "{0} correlation cookie and state property mismatch.", correlationKey);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -936,7 +936,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
|
||||
private async Task<MessageReceivedContext> RunMessageReceivedEventAsync(OpenIdConnectMessage message)
|
||||
{
|
||||
Logger.LogDebug(Resources.OIDCH_0001_MessageReceived, message.BuildRedirectUrl());
|
||||
Logger.LogDebug(29, "MessageReceived: '{0}'", message.BuildRedirectUrl());
|
||||
var messageReceivedContext = new MessageReceivedContext(Context, Options)
|
||||
{
|
||||
ProtocolMessage = message
|
||||
|
|
@ -945,11 +945,11 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
await Options.Events.MessageReceived(messageReceivedContext);
|
||||
if (messageReceivedContext.HandledResponse)
|
||||
{
|
||||
Logger.LogVerbose(Resources.OIDCH_0002_MessageReceivedContextHandledResponse);
|
||||
Logger.LogVerbose(30, "MessageReceivedContext.HandledResponse");
|
||||
}
|
||||
else if (messageReceivedContext.Skipped)
|
||||
{
|
||||
Logger.LogVerbose(Resources.OIDCH_0003_MessageReceivedContextSkipped);
|
||||
Logger.LogVerbose(31, "MessageReceivedContext.Skipped");
|
||||
}
|
||||
|
||||
return messageReceivedContext;
|
||||
|
|
@ -960,7 +960,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
var redirectUri = properties.Items.ContainsKey(OpenIdConnectDefaults.RedirectUriForCodePropertiesKey) ?
|
||||
properties.Items[OpenIdConnectDefaults.RedirectUriForCodePropertiesKey] : Options.RedirectUri;
|
||||
|
||||
Logger.LogDebug(Resources.OIDCH_0014_AuthorizationCodeReceived, message.Code);
|
||||
Logger.LogDebug(32, "AuthorizationCode received: '{0}'", message.Code);
|
||||
|
||||
var authorizationCodeReceivedContext = new AuthorizationCodeReceivedContext(Context, Options)
|
||||
{
|
||||
|
|
@ -974,11 +974,11 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
await Options.Events.AuthorizationCodeReceived(authorizationCodeReceivedContext);
|
||||
if (authorizationCodeReceivedContext.HandledResponse)
|
||||
{
|
||||
Logger.LogVerbose(Resources.OIDCH_0015_AuthorizationCodeReceivedContextHandledResponse);
|
||||
Logger.LogVerbose(33, "AuthorizationCodeReceivedContext.HandledResponse");
|
||||
}
|
||||
else if (authorizationCodeReceivedContext.Skipped)
|
||||
{
|
||||
Logger.LogVerbose(Resources.OIDCH_0016_AuthorizationCodeReceivedContextSkipped);
|
||||
Logger.LogVerbose(34, "AuthorizationCodeReceivedContext.Skipped");
|
||||
}
|
||||
|
||||
return authorizationCodeReceivedContext;
|
||||
|
|
@ -986,7 +986,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
|
||||
private async Task<TokenResponseReceivedContext> RunTokenResponseReceivedEventAsync(OpenIdConnectMessage message, OpenIdConnectTokenEndpointResponse tokenEndpointResponse)
|
||||
{
|
||||
Logger.LogDebug("Token response received.");
|
||||
Logger.LogDebug(35, "Token response received.");
|
||||
var tokenResponseReceivedContext = new TokenResponseReceivedContext(Context, Options)
|
||||
{
|
||||
ProtocolMessage = message,
|
||||
|
|
@ -996,11 +996,11 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
await Options.Events.TokenResponseReceived(tokenResponseReceivedContext);
|
||||
if (tokenResponseReceivedContext.HandledResponse)
|
||||
{
|
||||
Logger.LogVerbose(Resources.OIDCH_0043_AuthorizationCodeRedeemedContextHandledResponse);
|
||||
Logger.LogVerbose(36, "AuthorizationCodeRedeemedContext.HandledResponse");
|
||||
}
|
||||
else if (tokenResponseReceivedContext.Skipped)
|
||||
{
|
||||
Logger.LogVerbose(Resources.OIDCH_0044_AuthorizationCodeRedeemedContextSkipped);
|
||||
Logger.LogVerbose(37, "AuthorizationCodeRedeemedContext.Skipped");
|
||||
}
|
||||
return tokenResponseReceivedContext;
|
||||
}
|
||||
|
|
@ -1017,11 +1017,11 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
await Options.Events.AuthenticationValidated(authenticationValidatedContext);
|
||||
if (authenticationValidatedContext.HandledResponse)
|
||||
{
|
||||
Logger.LogVerbose("AuthenticationValidated.HandledResponse");
|
||||
Logger.LogVerbose(38, "AuthenticationValidated.HandledResponse");
|
||||
}
|
||||
else if (authenticationValidatedContext.Skipped)
|
||||
{
|
||||
Logger.LogVerbose("AuthenticationValidated.Skipped");
|
||||
Logger.LogVerbose(39, "AuthenticationValidated.Skipped");
|
||||
}
|
||||
|
||||
return authenticationValidatedContext;
|
||||
|
|
@ -1029,7 +1029,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
|
||||
private async Task<UserInformationReceivedContext> RunUserInformationReceivedEventAsync(AuthenticationTicket ticket, OpenIdConnectMessage message, JObject user)
|
||||
{
|
||||
Logger.LogDebug("User information received:" + user.ToString());
|
||||
Logger.LogDebug(40, "User information received: {0}", user.ToString());
|
||||
|
||||
var userInformationReceivedContext = new UserInformationReceivedContext(Context, Options)
|
||||
{
|
||||
|
|
@ -1041,11 +1041,11 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
await Options.Events.UserInformationReceived(userInformationReceivedContext);
|
||||
if (userInformationReceivedContext.HandledResponse)
|
||||
{
|
||||
Logger.LogVerbose("The UserInformationReceived event returned Handled.");
|
||||
Logger.LogVerbose(41, "The UserInformationReceived event returned Handled.");
|
||||
}
|
||||
else if (userInformationReceivedContext.Skipped)
|
||||
{
|
||||
Logger.LogVerbose("The UserInformationReceived event returned Skipped.");
|
||||
Logger.LogVerbose(42, "The UserInformationReceived event returned Skipped.");
|
||||
}
|
||||
|
||||
return userInformationReceivedContext;
|
||||
|
|
@ -1062,11 +1062,11 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
await Options.Events.AuthenticationFailed(authenticationFailedContext);
|
||||
if (authenticationFailedContext.HandledResponse)
|
||||
{
|
||||
Logger.LogVerbose(Resources.OIDCH_0018_AuthenticationFailedContextHandledResponse);
|
||||
Logger.LogVerbose(43, "AuthenticationFailedContext.HandledResponse");
|
||||
}
|
||||
else if (authenticationFailedContext.Skipped)
|
||||
{
|
||||
Logger.LogVerbose(Resources.OIDCH_0019_AuthenticationFailedContextSkipped);
|
||||
Logger.LogVerbose(44, "AuthenticationFailedContext.Skipped");
|
||||
}
|
||||
|
||||
return authenticationFailedContext;
|
||||
|
|
@ -1099,15 +1099,15 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
jwt = validatedToken as JwtSecurityToken;
|
||||
if (jwt == null)
|
||||
{
|
||||
Logger.LogError(Resources.OIDCH_0010_ValidatedSecurityTokenNotJwt, validatedToken?.GetType());
|
||||
throw new SecurityTokenException(string.Format(CultureInfo.InvariantCulture, Resources.OIDCH_0010_ValidatedSecurityTokenNotJwt, validatedToken?.GetType()));
|
||||
Logger.LogError(45, "The Validated Security Token must be of type JwtSecurityToken, but instead its type is: '{0}'", validatedToken?.GetType());
|
||||
throw new SecurityTokenException(string.Format(CultureInfo.InvariantCulture, Resources.ValidatedSecurityTokenNotJwt, validatedToken?.GetType()));
|
||||
}
|
||||
}
|
||||
|
||||
if (validatedToken == null)
|
||||
{
|
||||
Logger.LogError(Resources.OIDCH_0011_UnableToValidateToken, idToken);
|
||||
throw new SecurityTokenException(string.Format(CultureInfo.InvariantCulture, Resources.OIDCH_0011_UnableToValidateToken, idToken));
|
||||
Logger.LogError(46, "Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: '{0}'.", idToken);
|
||||
throw new SecurityTokenException(string.Format(CultureInfo.InvariantCulture, Resources.UnableToValidateToken, idToken));
|
||||
}
|
||||
|
||||
ticket = new AuthenticationTicket(principal, properties, Options.AuthenticationScheme);
|
||||
|
|
|
|||
|
|
@ -11,627 +11,99 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect
|
|||
= new ResourceManager("Microsoft.AspNet.Authentication.OpenIdConnect.Resources", typeof(Resources).GetTypeInfo().Assembly);
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0101: BackchannelTimeout cannot be less or equal to TimeSpan.Zero.
|
||||
/// OpenIdConnectAuthenticationHandler: message.State is null or empty.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0101_BackChallnelLessThanZero
|
||||
internal static string MessageStateIsNullOrEmpty
|
||||
{
|
||||
get { return GetString("OIDCH_0101_BackChallnelLessThanZero"); }
|
||||
get { return GetString("MessageStateIsNullOrEmpty"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0101: BackchannelTimeout cannot be less or equal to TimeSpan.Zero.
|
||||
/// OpenIdConnectAuthenticationHandler: message.State is null or empty.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0101_BackChallnelLessThanZero()
|
||||
internal static string FormatMessageStateIsNullOrEmpty()
|
||||
{
|
||||
return GetString("OIDCH_0101_BackChallnelLessThanZero");
|
||||
return GetString("MessageStateIsNullOrEmpty");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0102: An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
|
||||
/// Unable to unprotect the message.State.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0102_Exception_ValidatorHandlerMismatch
|
||||
internal static string MessageStateIsInvalid
|
||||
{
|
||||
get { return GetString("OIDCH_0102_Exception_ValidatorHandlerMismatch"); }
|
||||
get { return GetString("MessageStateIsInvalid"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0102: An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.
|
||||
/// Unable to unprotect the message.State.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0102_Exception_ValidatorHandlerMismatch()
|
||||
internal static string FormatMessageStateIsInvalid()
|
||||
{
|
||||
return GetString("OIDCH_0102_Exception_ValidatorHandlerMismatch");
|
||||
return GetString("MessageStateIsInvalid");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDC_0051: The query string for Logout is not a well formed URI. The runtime cannot redirect. Redirect uri: '{0}'.
|
||||
/// Message contains error: '{0}', error_description: '{1}', error_uri: '{2}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0051_RedirectUriLogoutIsNotWellFormed
|
||||
internal static string MessageContainsError
|
||||
{
|
||||
get { return GetString("OIDCH_0051_RedirectUriLogoutIsNotWellFormed"); }
|
||||
get { return GetString("MessageContainsError"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDC_0051: The query string for Logout is not a well formed URI. The runtime cannot redirect. Redirect uri: '{0}'.
|
||||
/// Message contains error: '{0}', error_description: '{1}', error_uri: '{2}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0051_RedirectUriLogoutIsNotWellFormed(object p0)
|
||||
internal static string FormatMessageContainsError(object p0, object p1, object p2)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0051_RedirectUriLogoutIsNotWellFormed"), p0);
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("MessageContainsError"), p0, p1, p2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0026: Entering: '{0}'
|
||||
/// The Validated Security Token must be of type JwtSecurityToken, but instead its type is: '{0}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0026_ApplyResponseChallengeAsync
|
||||
internal static string ValidatedSecurityTokenNotJwt
|
||||
{
|
||||
get { return GetString("OIDCH_0026_ApplyResponseChallengeAsync"); }
|
||||
get { return GetString("ValidatedSecurityTokenNotJwt"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0026: Entering: '{0}'
|
||||
/// The Validated Security Token must be of type JwtSecurityToken, but instead its type is: '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0026_ApplyResponseChallengeAsync(object p0)
|
||||
internal static string FormatValidatedSecurityTokenNotJwt(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0026_ApplyResponseChallengeAsync"), p0);
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("ValidatedSecurityTokenNotJwt"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0027: Converted 401 to 403.
|
||||
/// Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: '{0}'."
|
||||
/// </summary>
|
||||
internal static string OIDCH_0027_401_ConvertedTo_403
|
||||
internal static string UnableToValidateToken
|
||||
{
|
||||
get { return GetString("OIDCH_0027_401_ConvertedTo_403"); }
|
||||
get { return GetString("UnableToValidateToken"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0027: Converted 401 to 403.
|
||||
/// Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: '{0}'."
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0027_401_ConvertedTo_403()
|
||||
internal static string FormatUnableToValidateToken(object p0)
|
||||
{
|
||||
return GetString("OIDCH_0027_401_ConvertedTo_403");
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("UnableToValidateToken"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0028: Response.StatusCode != 401, StatusCode: '{0}'.
|
||||
/// Cannot process the message. Both id_token and code are missing.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0028_StatusCodeNot401
|
||||
internal static string IdTokenCodeMissing
|
||||
{
|
||||
get { return GetString("OIDCH_0028_StatusCodeNot401"); }
|
||||
get { return GetString("IdTokenCodeMissing"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0028: Response.StatusCode != 401, StatusCode: '{0}'.
|
||||
/// Cannot process the message. Both id_token and code are missing.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0028_StatusCodeNot401(object p0)
|
||||
internal static string FormatIdTokenCodeMissing()
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0028_StatusCodeNot401"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0029: ChallengeContext == null AND !Options.AutomaticAuthenticate
|
||||
/// </summary>
|
||||
internal static string OIDCH_0029_ChallengContextEqualsNull
|
||||
{
|
||||
get { return GetString("OIDCH_0029_ChallengContextEqualsNull"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0029: ChallengeContext == null AND !Options.AutomaticAuthenticate
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0029_ChallengContextEqualsNull()
|
||||
{
|
||||
return GetString("OIDCH_0029_ChallengContextEqualsNull");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0030: Using properties.RedirectUri for 'local redirect' post authentication: '{0}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0030_Using_Properties_RedirectUri
|
||||
{
|
||||
get { return GetString("OIDCH_0030_Using_Properties_RedirectUri"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0030: Using properties.RedirectUri for 'local redirect' post authentication: '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0030_Using_Properties_RedirectUri(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0030_Using_Properties_RedirectUri"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0031: Using Options.RedirectUri for 'redirect_uri': '{0}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0031_Using_Options_RedirectUri
|
||||
{
|
||||
get { return GetString("OIDCH_0031_Using_Options_RedirectUri"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0031: Using Options.RedirectUri for 'redirect_uri': '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0031_Using_Options_RedirectUri(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0031_Using_Options_RedirectUri"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0032: using the CurrentUri for 'local redirect' post authentication: '{0}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0032_UsingCurrentUriRedirectUri
|
||||
{
|
||||
get { return GetString("OIDCH_0032_UsingCurrentUriRedirectUri"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0032: using the CurrentUri for 'local redirect' post authentication: '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0032_UsingCurrentUriRedirectUri(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0032_UsingCurrentUriRedirectUri"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0033: ProtocolValidator.RequireNonce == true. The generated nonce already exists: this usually indicates the nonce is not unique or has been used. The nonce is: '{0}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0033_NonceAlreadyExists
|
||||
{
|
||||
get { return GetString("OIDCH_0033_NonceAlreadyExists"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0033: ProtocolValidator.RequireNonce == true. The generated nonce already exists: this usually indicates the nonce is not unique or has been used. The nonce is: '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0033_NonceAlreadyExists(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0033_NonceAlreadyExists"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0036: Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute) returned 'false', redirectUri is: '{0}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0036_UriIsNotWellFormed
|
||||
{
|
||||
get { return GetString("OIDCH_0036_UriIsNotWellFormed"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0036: Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute) returned 'false', redirectUri is: '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0036_UriIsNotWellFormed(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0036_UriIsNotWellFormed"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0037: RedirectUri is: '{0}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0037_RedirectUri
|
||||
{
|
||||
get { return GetString("OIDCH_0037_RedirectUri"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0037: RedirectUri is: '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0037_RedirectUri(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0037_RedirectUri"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0038: Id Token is null. Redeeming code : {0} for tokens.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0038_Redeeming_Auth_Code
|
||||
{
|
||||
get { return GetString("OIDCH_0038_Redeeming_Auth_Code"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0038: Id Token is null. Redeeming code : {0} for tokens.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0038_Redeeming_Auth_Code(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0038_Redeeming_Auth_Code"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0039: Subject claim received from userinfo endpoint does not match the one in the id token.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0039_Subject_Claim_Mismatch
|
||||
{
|
||||
get { return GetString("OIDCH_0039_Subject_Claim_Mismatch"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0039: Subject claim received from userinfo endpoint does not match the one in the id token.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0039_Subject_Claim_Mismatch()
|
||||
{
|
||||
return GetString("OIDCH_0039_Subject_Claim_Mismatch");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0040: Sending request to user info endpoint for retrieving claims.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0040_Sending_Request_UIEndpoint
|
||||
{
|
||||
get { return GetString("OIDCH_0040_Sending_Request_UIEndpoint"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0040: Sending request to user info endpoint for retrieving claims.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0040_Sending_Request_UIEndpoint()
|
||||
{
|
||||
return GetString("OIDCH_0040_Sending_Request_UIEndpoint");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0000: Entering: '{0}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0000_AuthenticateCoreAsync
|
||||
{
|
||||
get { return GetString("OIDCH_0000_AuthenticateCoreAsync"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0000: Entering: '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0000_AuthenticateCoreAsync(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0000_AuthenticateCoreAsync"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0001: MessageReceived: '{0}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0001_MessageReceived
|
||||
{
|
||||
get { return GetString("OIDCH_0001_MessageReceived"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0001: MessageReceived: '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0001_MessageReceived(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0001_MessageReceived"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0002: MessageReceivedContext.HandledResponse
|
||||
/// </summary>
|
||||
internal static string OIDCH_0002_MessageReceivedContextHandledResponse
|
||||
{
|
||||
get { return GetString("OIDCH_0002_MessageReceivedContextHandledResponse"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0002: MessageReceivedContext.HandledResponse
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0002_MessageReceivedContextHandledResponse()
|
||||
{
|
||||
return GetString("OIDCH_0002_MessageReceivedContextHandledResponse");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0003: MessageReceivedContext.Skipped
|
||||
/// </summary>
|
||||
internal static string OIDCH_0003_MessageReceivedContextSkipped
|
||||
{
|
||||
get { return GetString("OIDCH_0003_MessageReceivedContextSkipped"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0003: MessageReceivedContext.Skipped
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0003_MessageReceivedContextSkipped()
|
||||
{
|
||||
return GetString("OIDCH_0003_MessageReceivedContextSkipped");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0004: OpenIdConnectAuthenticationHandler: message.State is null or empty.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0004_MessageStateIsNullOrEmpty
|
||||
{
|
||||
get { return GetString("OIDCH_0004_MessageStateIsNullOrEmpty"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0004: OpenIdConnectAuthenticationHandler: message.State is null or empty.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0004_MessageStateIsNullOrEmpty()
|
||||
{
|
||||
return GetString("OIDCH_0004_MessageStateIsNullOrEmpty");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0005: Unable to unprotect the message.State.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0005_MessageStateIsInvalid
|
||||
{
|
||||
get { return GetString("OIDCH_0005_MessageStateIsInvalid"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0005: Unable to unprotect the message.State.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0005_MessageStateIsInvalid()
|
||||
{
|
||||
return GetString("OIDCH_0005_MessageStateIsInvalid");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0006: Message contains error: '{0}', error_description: '{1}', error_uri: '{2}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0006_MessageContainsError
|
||||
{
|
||||
get { return GetString("OIDCH_0006_MessageContainsError"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0006: Message contains error: '{0}', error_description: '{1}', error_uri: '{2}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0006_MessageContainsError(object p0, object p1, object p2)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0006_MessageContainsError"), p0, p1, p2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0007: Updating configuration
|
||||
/// </summary>
|
||||
internal static string OIDCH_0007_UpdatingConfiguration
|
||||
{
|
||||
get { return GetString("OIDCH_0007_UpdatingConfiguration"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0007: Updating configuration
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0007_UpdatingConfiguration()
|
||||
{
|
||||
return GetString("OIDCH_0007_UpdatingConfiguration");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0010: Validated Security Token must be a JwtSecurityToken was: '{0}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0010_ValidatedSecurityTokenNotJwt
|
||||
{
|
||||
get { return GetString("OIDCH_0010_ValidatedSecurityTokenNotJwt"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0010: Validated Security Token must be a JwtSecurityToken was: '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0010_ValidatedSecurityTokenNotJwt(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0010_ValidatedSecurityTokenNotJwt"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0011: Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: '{0}'."
|
||||
/// </summary>
|
||||
internal static string OIDCH_0011_UnableToValidateToken
|
||||
{
|
||||
get { return GetString("OIDCH_0011_UnableToValidateToken"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0011: Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: '{0}'."
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0011_UnableToValidateToken(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0011_UnableToValidateToken"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0014: AuthorizationCode received: '{0}'.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0014_AuthorizationCodeReceived
|
||||
{
|
||||
get { return GetString("OIDCH_0014_AuthorizationCodeReceived"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0014: AuthorizationCode received: '{0}'.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0014_AuthorizationCodeReceived(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0014_AuthorizationCodeReceived"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0015: AuthorizationCodeReceivedContext.HandledResponse
|
||||
/// </summary>
|
||||
internal static string OIDCH_0015_AuthorizationCodeReceivedContextHandledResponse
|
||||
{
|
||||
get { return GetString("OIDCH_0015_AuthorizationCodeReceivedContextHandledResponse"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0015: AuthorizationCodeReceivedContext.HandledResponse
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0015_AuthorizationCodeReceivedContextHandledResponse()
|
||||
{
|
||||
return GetString("OIDCH_0015_AuthorizationCodeReceivedContextHandledResponse");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0016: AuthorizationCodeReceivedContext.Skipped
|
||||
/// </summary>
|
||||
internal static string OIDCH_0016_AuthorizationCodeReceivedContextSkipped
|
||||
{
|
||||
get { return GetString("OIDCH_0016_AuthorizationCodeReceivedContextSkipped"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0016: AuthorizationCodeReceivedContext.Skipped
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0016_AuthorizationCodeReceivedContextSkipped()
|
||||
{
|
||||
return GetString("OIDCH_0016_AuthorizationCodeReceivedContextSkipped");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0017: Exception occurred while processing message.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0017_ExceptionOccurredWhileProcessingMessage
|
||||
{
|
||||
get { return GetString("OIDCH_0017_ExceptionOccurredWhileProcessingMessage"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0017: Exception occurred while processing message.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0017_ExceptionOccurredWhileProcessingMessage()
|
||||
{
|
||||
return GetString("OIDCH_0017_ExceptionOccurredWhileProcessingMessage");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0018: AuthenticationFailedContext.HandledResponse
|
||||
/// </summary>
|
||||
internal static string OIDCH_0018_AuthenticationFailedContextHandledResponse
|
||||
{
|
||||
get { return GetString("OIDCH_0018_AuthenticationFailedContextHandledResponse"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0018: AuthenticationFailedContext.HandledResponse
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0018_AuthenticationFailedContextHandledResponse()
|
||||
{
|
||||
return GetString("OIDCH_0018_AuthenticationFailedContextHandledResponse");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0019: AuthenticationFailedContext.Skipped
|
||||
/// </summary>
|
||||
internal static string OIDCH_0019_AuthenticationFailedContextSkipped
|
||||
{
|
||||
get { return GetString("OIDCH_0019_AuthenticationFailedContextSkipped"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0019: AuthenticationFailedContext.Skipped
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0019_AuthenticationFailedContextSkipped()
|
||||
{
|
||||
return GetString("OIDCH_0019_AuthenticationFailedContextSkipped");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0020: 'id_token' received: '{0}'
|
||||
/// </summary>
|
||||
internal static string OIDCH_0020_IdTokenReceived
|
||||
{
|
||||
get { return GetString("OIDCH_0020_IdTokenReceived"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0020: 'id_token' received: '{0}'
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0020_IdTokenReceived(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0020_IdTokenReceived"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0021: exception of type 'SecurityTokenSignatureKeyNotFoundException' thrown, Options.ConfigurationManager.RequestRefresh() called.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0021_AutomaticConfigurationRefresh
|
||||
{
|
||||
get { return GetString("OIDCH_0021_AutomaticConfigurationRefresh"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0021: exception of type 'SecurityTokenSignatureKeyNotFoundException' thrown, Options.ConfigurationManager.RequestRefresh() called.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0021_AutomaticConfigurationRefresh()
|
||||
{
|
||||
return GetString("OIDCH_0021_AutomaticConfigurationRefresh");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0041: Subject claim not found in {0}.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0041_Subject_Claim_Not_Found
|
||||
{
|
||||
get { return GetString("OIDCH_0041_Subject_Claim_Not_Found"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0041: Subject claim not found in {0}.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0041_Subject_Claim_Not_Found(object p0)
|
||||
{
|
||||
return string.Format(CultureInfo.CurrentCulture, GetString("OIDCH_0041_Subject_Claim_Not_Found"), p0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0043: AuthorizationCodeRedeemedContext.HandledResponse
|
||||
/// </summary>
|
||||
internal static string OIDCH_0043_AuthorizationCodeRedeemedContextHandledResponse
|
||||
{
|
||||
get { return GetString("OIDCH_0043_AuthorizationCodeRedeemedContextHandledResponse"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0043: AuthorizationCodeRedeemedContext.HandledResponse
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0043_AuthorizationCodeRedeemedContextHandledResponse()
|
||||
{
|
||||
return GetString("OIDCH_0043_AuthorizationCodeRedeemedContextHandledResponse");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0044: AuthorizationCodeRedeemedContext.Skipped
|
||||
/// </summary>
|
||||
internal static string OIDCH_0044_AuthorizationCodeRedeemedContextSkipped
|
||||
{
|
||||
get { return GetString("OIDCH_0044_AuthorizationCodeRedeemedContextSkipped"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0044: AuthorizationCodeRedeemedContext.Skipped
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0044_AuthorizationCodeRedeemedContextSkipped()
|
||||
{
|
||||
return GetString("OIDCH_0044_AuthorizationCodeRedeemedContextSkipped");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0045: Cannot process the message. Both id_token and code are missing.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0045_Id_Token_Code_Missing
|
||||
{
|
||||
get { return GetString("OIDCH_0045_Id_Token_Code_Missing"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0045: Cannot process the message. Both id_token and code are missing.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0045_Id_Token_Code_Missing()
|
||||
{
|
||||
return GetString("OIDCH_0045_Id_Token_Code_Missing");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0046: UserInfo endpoint is not set. Request to retrieve claims from userinfo endpoint cannot be completed.
|
||||
/// </summary>
|
||||
internal static string OIDCH_0046_UserInfo_Endpoint_Not_Set
|
||||
{
|
||||
get { return GetString("OIDCH_0046_UserInfo_Endpoint_Not_Set"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OIDCH_0046: UserInfo endpoint is not set. Request to retrieve claims from userinfo endpoint cannot be completed.
|
||||
/// </summary>
|
||||
internal static string FormatOIDCH_0046_UserInfo_Endpoint_Not_Set()
|
||||
{
|
||||
return GetString("OIDCH_0046_UserInfo_Endpoint_Not_Set");
|
||||
return GetString("IdTokenCodeMissing");
|
||||
}
|
||||
|
||||
private static string GetString(string name, params string[] formatterNames)
|
||||
|
|
|
|||
|
|
@ -117,121 +117,22 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="OIDCH_0101_BackChallnelLessThanZero" xml:space="preserve">
|
||||
<value>OIDCH_0101: BackchannelTimeout cannot be less or equal to TimeSpan.Zero.</value>
|
||||
<data name="MessageStateIsNullOrEmpty" xml:space="preserve">
|
||||
<value>OpenIdConnectAuthenticationHandler: message.State is null or empty.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0102_Exception_ValidatorHandlerMismatch" xml:space="preserve">
|
||||
<value>OIDCH_0102: An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.</value>
|
||||
<data name="MessageStateIsInvalid" xml:space="preserve">
|
||||
<value>Unable to unprotect the message.State.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0051_RedirectUriLogoutIsNotWellFormed" xml:space="preserve">
|
||||
<value>OIDC_0051: The query string for Logout is not a well formed URI. The runtime cannot redirect. Redirect uri: '{0}'.</value>
|
||||
<data name="MessageContainsError" xml:space="preserve">
|
||||
<value>Message contains error: '{0}', error_description: '{1}', error_uri: '{2}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0026_ApplyResponseChallengeAsync" xml:space="preserve">
|
||||
<value>OIDCH_0026: Entering: '{0}'</value>
|
||||
<data name="ValidatedSecurityTokenNotJwt" xml:space="preserve">
|
||||
<value>The Validated Security Token must be of type JwtSecurityToken, but instead its type is: '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0027_401_ConvertedTo_403" xml:space="preserve">
|
||||
<value>OIDCH_0027: Converted 401 to 403.</value>
|
||||
<data name="UnableToValidateToken" xml:space="preserve">
|
||||
<value>Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: '{0}'."</value>
|
||||
</data>
|
||||
<data name="OIDCH_0028_StatusCodeNot401" xml:space="preserve">
|
||||
<value>OIDCH_0028: Response.StatusCode != 401, StatusCode: '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0029_ChallengContextEqualsNull" xml:space="preserve">
|
||||
<value>OIDCH_0029: ChallengeContext == null AND !Options.AutomaticAuthenticate</value>
|
||||
</data>
|
||||
<data name="OIDCH_0030_Using_Properties_RedirectUri" xml:space="preserve">
|
||||
<value>OIDCH_0030: Using properties.RedirectUri for 'local redirect' post authentication: '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0031_Using_Options_RedirectUri" xml:space="preserve">
|
||||
<value>OIDCH_0031: Using Options.RedirectUri for 'redirect_uri': '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0032_UsingCurrentUriRedirectUri" xml:space="preserve">
|
||||
<value>OIDCH_0032: using the CurrentUri for 'local redirect' post authentication: '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0033_NonceAlreadyExists" xml:space="preserve">
|
||||
<value>OIDCH_0033: ProtocolValidator.RequireNonce == true. The generated nonce already exists: this usually indicates the nonce is not unique or has been used. The nonce is: '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0036_UriIsNotWellFormed" xml:space="preserve">
|
||||
<value>OIDCH_0036: Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute) returned 'false', redirectUri is: '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0037_RedirectUri" xml:space="preserve">
|
||||
<value>OIDCH_0037: RedirectUri is: '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0038_Redeeming_Auth_Code" xml:space="preserve">
|
||||
<value>OIDCH_0038: Id Token is null. Redeeming code : {0} for tokens.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0039_Subject_Claim_Mismatch" xml:space="preserve">
|
||||
<value>OIDCH_0039: Subject claim received from userinfo endpoint does not match the one in the id token.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0040_Sending_Request_UIEndpoint" xml:space="preserve">
|
||||
<value>OIDCH_0040: Sending request to user info endpoint for retrieving claims.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0000_AuthenticateCoreAsync" xml:space="preserve">
|
||||
<value>OIDCH_0000: Entering: '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0001_MessageReceived" xml:space="preserve">
|
||||
<value>OIDCH_0001: MessageReceived: '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0002_MessageReceivedContextHandledResponse" xml:space="preserve">
|
||||
<value>OIDCH_0002: MessageReceivedContext.HandledResponse</value>
|
||||
</data>
|
||||
<data name="OIDCH_0003_MessageReceivedContextSkipped" xml:space="preserve">
|
||||
<value>OIDCH_0003: MessageReceivedContext.Skipped</value>
|
||||
</data>
|
||||
<data name="OIDCH_0004_MessageStateIsNullOrEmpty" xml:space="preserve">
|
||||
<value>OIDCH_0004: OpenIdConnectAuthenticationHandler: message.State is null or empty.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0005_MessageStateIsInvalid" xml:space="preserve">
|
||||
<value>OIDCH_0005: Unable to unprotect the message.State.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0006_MessageContainsError" xml:space="preserve">
|
||||
<value>OIDCH_0006: Message contains error: '{0}', error_description: '{1}', error_uri: '{2}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0007_UpdatingConfiguration" xml:space="preserve">
|
||||
<value>OIDCH_0007: Updating configuration</value>
|
||||
</data>
|
||||
<data name="OIDCH_0010_ValidatedSecurityTokenNotJwt" xml:space="preserve">
|
||||
<value>OIDCH_0010: Validated Security Token must be a JwtSecurityToken was: '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0011_UnableToValidateToken" xml:space="preserve">
|
||||
<value>OIDCH_0011: Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: '{0}'."</value>
|
||||
</data>
|
||||
<data name="OIDCH_0014_AuthorizationCodeReceived" xml:space="preserve">
|
||||
<value>OIDCH_0014: AuthorizationCode received: '{0}'.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0015_AuthorizationCodeReceivedContextHandledResponse" xml:space="preserve">
|
||||
<value>OIDCH_0015: AuthorizationCodeReceivedContext.HandledResponse</value>
|
||||
</data>
|
||||
<data name="OIDCH_0016_AuthorizationCodeReceivedContextSkipped" xml:space="preserve">
|
||||
<value>OIDCH_0016: AuthorizationCodeReceivedContext.Skipped</value>
|
||||
</data>
|
||||
<data name="OIDCH_0017_ExceptionOccurredWhileProcessingMessage" xml:space="preserve">
|
||||
<value>OIDCH_0017: Exception occurred while processing message.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0018_AuthenticationFailedContextHandledResponse" xml:space="preserve">
|
||||
<value>OIDCH_0018: AuthenticationFailedContext.HandledResponse</value>
|
||||
</data>
|
||||
<data name="OIDCH_0019_AuthenticationFailedContextSkipped" xml:space="preserve">
|
||||
<value>OIDCH_0019: AuthenticationFailedContext.Skipped</value>
|
||||
</data>
|
||||
<data name="OIDCH_0020_IdTokenReceived" xml:space="preserve">
|
||||
<value>OIDCH_0020: 'id_token' received: '{0}'</value>
|
||||
</data>
|
||||
<data name="OIDCH_0021_AutomaticConfigurationRefresh" xml:space="preserve">
|
||||
<value>OIDCH_0021: exception of type 'SecurityTokenSignatureKeyNotFoundException' thrown, Options.ConfigurationManager.RequestRefresh() called.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0041_Subject_Claim_Not_Found" xml:space="preserve">
|
||||
<value>OIDCH_0041: Subject claim not found in {0}.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0043_AuthorizationCodeRedeemedContextHandledResponse" xml:space="preserve">
|
||||
<value>OIDCH_0043: AuthorizationCodeRedeemedContext.HandledResponse</value>
|
||||
</data>
|
||||
<data name="OIDCH_0044_AuthorizationCodeRedeemedContextSkipped" xml:space="preserve">
|
||||
<value>OIDCH_0044: AuthorizationCodeRedeemedContext.Skipped</value>
|
||||
</data>
|
||||
<data name="OIDCH_0045_Id_Token_Code_Missing" xml:space="preserve">
|
||||
<value>OIDCH_0045: Cannot process the message. Both id_token and code are missing.</value>
|
||||
</data>
|
||||
<data name="OIDCH_0046_UserInfo_Endpoint_Not_Set" xml:space="preserve">
|
||||
<value>OIDCH_0046: UserInfo endpoint is not set. Request to retrieve claims from userinfo endpoint cannot be completed.</value>
|
||||
<data name="IdTokenCodeMissing" xml:space="preserve">
|
||||
<value>Cannot process the message. Both id_token and code are missing.</value>
|
||||
</data>
|
||||
</root>
|
||||
Loading…
Reference in New Issue