Cleaning up comments and some TODOs.

This commit is contained in:
tushar gupta 2015-01-16 14:35:11 -08:00 committed by Chris Ross
parent cdbd003bb1
commit c53394e847
5 changed files with 19 additions and 14 deletions

View File

@ -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.
/// </summary>
public INonceCache NoneCache { get; set; }
public INonceCache NonceCache { get; set; }
/// <summary>
/// Gets or sets the discovery endpoint for obtaining metadata
@ -181,7 +181,7 @@ namespace Microsoft.AspNet.Security.OpenIdConnect
public OpenIdConnectAuthenticationNotifications Notifications { get; set; }
/// <summary>
/// Gets or sets the <see cref="OpenIdConnectProtocolValidator"/> that is used ensure the 'id_token' received
/// Gets or sets the <see cref="OpenIdConnectProtocolValidator"/> that is used to ensure that the 'id_token' received
/// is valid per: http://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation
/// </summary>
/// <exception cref="ArgumentNullException">if 'value' is null.</exception>
@ -262,7 +262,7 @@ namespace Microsoft.AspNet.Security.OpenIdConnect
/// <summary>
/// Gets or sets the type used to secure strings used by the middleware.
// </summary>
/// </summary>
public ISecureDataFormat<string> StringDataFormat
{
get

View File

@ -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
}
/// <summary>
/// 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.
/// </summary>
/// <returns></returns>
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
/// </summary>
/// <param name="nonceExpectedValue">the nonce that was found in the jwt token.</param>
/// <returns>'nonceExpectedValue' if a cookie is found that matches, null otherwise.</returns>
/// <remarks>Examins <see cref="HttpRequest.Cookies.Keys"/> that start with the prefix: 'OpenIdConnectAuthenticationDefaults.Nonce'.
/// <remarks>Examine <see cref="HttpRequest.Cookies.Keys"/> that start with the prefix: 'OpenIdConnectAuthenticationDefaults.Nonce'.
/// <see cref="OpenIdConnectAuthenticationOptions.StringDataFormat.Unprotect"/> is used to obtain the actual 'nonce'. If the nonce is found, then <see cref="HttpResponse.Cookies.Delete"/> is called.</remarks>
private string RetrieveNonce(string nonceExpectedValue)
{

View File

@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Security
/// Initializes a new instance of the <see cref="AuthenticationTicket"/> class
/// </summary>
/// <param name="identity">the <see cref="ClaimsPrincipal"/> that represents the authenticated user.</param>
/// <param name="properties">additional properties that can be consumed by the user or runtims.</param>
/// <param name="properties">additional properties that can be consumed by the user or runtime.</param>
/// <param name="authenticationType">the authentication middleware that was responsible for this ticket.</param>
public AuthenticationTicket(ClaimsPrincipal principal, AuthenticationProperties properties, string authenticationType)
{
@ -36,7 +36,7 @@ namespace Microsoft.AspNet.Security
}
/// <summary>
/// Gets the authenticated user identity.
/// Gets the authentication type.
/// </summary>
public string AuthenticationType { get; private set; }
@ -46,7 +46,7 @@ namespace Microsoft.AspNet.Security
public ClaimsIdentity Identity { get; private set; }
/// <summary>
/// Gets the authenticated user identity.
/// Gets the claims-principal with authenticated user identities.
/// </summary>
public ClaimsPrincipal Principal{ get; private set; }

View File

@ -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;

View File

@ -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
{