diff --git a/src/Microsoft.AspNet.Security.OpenIdConnect/OpenIdConnectAuthenticationOptions.cs b/src/Microsoft.AspNet.Security.OpenIdConnect/OpenIdConnectAuthenticationOptions.cs index 5f1b5077ec..a5f1bcd303 100644 --- a/src/Microsoft.AspNet.Security.OpenIdConnect/OpenIdConnectAuthenticationOptions.cs +++ b/src/Microsoft.AspNet.Security.OpenIdConnect/OpenIdConnectAuthenticationOptions.cs @@ -148,7 +148,7 @@ namespace Microsoft.AspNet.Security.OpenIdConnect /// recommends adding a nonce to a request as a mitigation against replay attacks when requesting id_tokens. /// By default the runtime uses cookies with unique names generated from a hash of the nonce. /// - public INonceCache NoneCache { get; set; } + public INonceCache NonceCache { get; set; } /// /// Gets or sets the discovery endpoint for obtaining metadata @@ -181,7 +181,7 @@ namespace Microsoft.AspNet.Security.OpenIdConnect public OpenIdConnectAuthenticationNotifications Notifications { get; set; } /// - /// Gets or sets the that is used ensure the 'id_token' received + /// Gets or sets the that is used to ensure that the 'id_token' received /// is valid per: http://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation /// /// if 'value' is null. @@ -262,7 +262,7 @@ namespace Microsoft.AspNet.Security.OpenIdConnect /// /// Gets or sets the type used to secure strings used by the middleware. - // + /// public ISecureDataFormat StringDataFormat { get diff --git a/src/Microsoft.AspNet.Security.OpenIdConnect/OpenidConnectAuthenticationHandler.cs b/src/Microsoft.AspNet.Security.OpenIdConnect/OpenidConnectAuthenticationHandler.cs index 317cd42e8b..96156f6534 100644 --- a/src/Microsoft.AspNet.Security.OpenIdConnect/OpenidConnectAuthenticationHandler.cs +++ b/src/Microsoft.AspNet.Security.OpenIdConnect/OpenidConnectAuthenticationHandler.cs @@ -77,7 +77,7 @@ namespace Microsoft.AspNet.Security.OpenIdConnect // Set End_Session_Endpoint in order: // 1. properties.Redirect // 2. Options.Wreply - AuthenticationProperties properties = new AuthenticationProperties(); // TODO signout.Properties; + AuthenticationProperties properties = new AuthenticationProperties(); if (properties != null && !string.IsNullOrEmpty(properties.RedirectUri)) { openIdConnectMessage.PostLogoutRedirectUri = properties.RedirectUri; @@ -111,7 +111,7 @@ namespace Microsoft.AspNet.Security.OpenIdConnect } /// - /// Responds to a 401 Challenge sends an OpenIdConnect message to the 'identity authority' to obtain an identity. + /// Responds to a 401 Challenge. Sends an OpenIdConnect message to the 'identity authority' to obtain an identity. /// /// protected override async Task ApplyResponseChallengeAsync() @@ -158,9 +158,9 @@ namespace Microsoft.AspNet.Security.OpenIdConnect if (Options.ProtocolValidator.RequireNonce) { openIdConnectMessage.Nonce = Options.ProtocolValidator.GenerateNonce(); - if (Options.NoneCache != null) + if (Options.NonceCache != null) { - Options.NoneCache.AddNonce(openIdConnectMessage.Nonce); + Options.NonceCache.AddNonce(openIdConnectMessage.Nonce); } else { @@ -215,7 +215,6 @@ namespace Microsoft.AspNet.Security.OpenIdConnect IFormCollection form = await Request.ReadFormAsync(); Request.Body.Seek(0, SeekOrigin.Begin); - // TODO: a delegate on OpenIdConnectAuthenticationOptions would allow for users to hook their own custom message. openIdConnectMessage = new OpenIdConnectMessage(form); } @@ -466,7 +465,7 @@ namespace Microsoft.AspNet.Security.OpenIdConnect /// /// the nonce that was found in the jwt token. /// 'nonceExpectedValue' if a cookie is found that matches, null otherwise. - /// Examins that start with the prefix: 'OpenIdConnectAuthenticationDefaults.Nonce'. + /// Examine that start with the prefix: 'OpenIdConnectAuthenticationDefaults.Nonce'. /// is used to obtain the actual 'nonce'. If the nonce is found, then is called. private string RetrieveNonce(string nonceExpectedValue) { diff --git a/src/Microsoft.AspNet.Security/AuthenticationTicket.cs b/src/Microsoft.AspNet.Security/AuthenticationTicket.cs index 7b7e50998b..82128f10cd 100644 --- a/src/Microsoft.AspNet.Security/AuthenticationTicket.cs +++ b/src/Microsoft.AspNet.Security/AuthenticationTicket.cs @@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Security /// Initializes a new instance of the class /// /// the that represents the authenticated user. - /// additional properties that can be consumed by the user or runtims. + /// additional properties that can be consumed by the user or runtime. /// the authentication middleware that was responsible for this ticket. public AuthenticationTicket(ClaimsPrincipal principal, AuthenticationProperties properties, string authenticationType) { @@ -36,7 +36,7 @@ namespace Microsoft.AspNet.Security } /// - /// Gets the authenticated user identity. + /// Gets the authentication type. /// public string AuthenticationType { get; private set; } @@ -46,7 +46,7 @@ namespace Microsoft.AspNet.Security public ClaimsIdentity Identity { get; private set; } /// - /// Gets the authenticated user identity. + /// Gets the claims-principal with authenticated user identities. /// public ClaimsPrincipal Principal{ get; private set; } diff --git a/src/Microsoft.AspNet.Security/Notifications/BaseNotification.cs b/src/Microsoft.AspNet.Security/Notifications/BaseNotification.cs index 1ef13e2dc5..d1ea6fef75 100644 --- a/src/Microsoft.AspNet.Security/Notifications/BaseNotification.cs +++ b/src/Microsoft.AspNet.Security/Notifications/BaseNotification.cs @@ -1,4 +1,6 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + using Microsoft.AspNet.Http; diff --git a/src/Microsoft.AspNet.Security/Notifications/NotificationResultState.cs b/src/Microsoft.AspNet.Security/Notifications/NotificationResultState.cs index 1f48e25b39..78d6c85caa 100644 --- a/src/Microsoft.AspNet.Security/Notifications/NotificationResultState.cs +++ b/src/Microsoft.AspNet.Security/Notifications/NotificationResultState.cs @@ -1,4 +1,8 @@ -using System; +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + + +using System; namespace Microsoft.AspNet.Security.Notifications {