summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-04-26 18:57:42 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-04-26 18:57:42 -0700
commit2d10888fe24b4ab9407e016ced20ae56622b15af (patch)
tree8a902072739e65b853033bbbebf1af063bad7f2d /samples
parented8e510edf71df2cda6dd18e263540626b3537ae (diff)
downloadDotNetOpenAuth-2d10888fe24b4ab9407e016ced20ae56622b15af.zip
DotNetOpenAuth-2d10888fe24b4ab9407e016ced20ae56622b15af.tar.gz
DotNetOpenAuth-2d10888fe24b4ab9407e016ced20ae56622b15af.tar.bz2
Stylecop fixes.
Diffstat (limited to 'samples')
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/Provider/AnonymousIdentifierProviderBase.cs11
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/Provider/AuthenticationRequestExtensions.cs15
-rw-r--r--samples/OpenIdProviderMvc/Code/AnonymousIdentifierProvider.cs8
-rw-r--r--samples/OpenIdProviderMvc/Code/Util.cs1
-rw-r--r--samples/OpenIdProviderMvc/Controllers/OpenIdController.cs10
-rw-r--r--samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs2
6 files changed, 22 insertions, 25 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/Provider/AnonymousIdentifierProviderBase.cs b/samples/DotNetOpenAuth.ApplicationBlock/Provider/AnonymousIdentifierProviderBase.cs
index 5354093..1df7267 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/Provider/AnonymousIdentifierProviderBase.cs
+++ b/samples/DotNetOpenAuth.ApplicationBlock/Provider/AnonymousIdentifierProviderBase.cs
@@ -18,8 +18,9 @@ namespace DotNetOpenAuth.ApplicationBlock.Provider {
private int newSaltLength = 20;
/// <summary>
- /// Initializes a new instance of the <see cref="StandardAnonymousIdentifierProvider"/> class.
+ /// Initializes a new instance of the <see cref="AnonymousIdentifierProviderBase"/> class.
/// </summary>
+ /// <param name="baseIdentifier">The base URI on which to append the anonymous part.</param>
public AnonymousIdentifierProviderBase(Uri baseIdentifier) {
if (baseIdentifier == null) {
throw new ArgumentNullException("baseIdentifier");
@@ -38,7 +39,7 @@ namespace DotNetOpenAuth.ApplicationBlock.Provider {
protected int NewSaltLength {
get {
- return newSaltLength;
+ return this.newSaltLength;
}
set {
@@ -46,14 +47,14 @@ namespace DotNetOpenAuth.ApplicationBlock.Provider {
throw new ArgumentOutOfRangeException("value");
}
- newSaltLength = value;
+ this.newSaltLength = value;
}
}
#region IAnonymousIdentifierProvider Members
public Uri GetAnonymousIdentifier(Identifier localIdentifier, Realm relyingPartyRealm) {
- byte[] salt = GetHashSaltForLocalIdentifier(localIdentifier);
+ byte[] salt = this.GetHashSaltForLocalIdentifier(localIdentifier);
string valueToHash = localIdentifier + "#" + (relyingPartyRealm ?? string.Empty);
byte[] valueAsBytes = this.Encoder.GetBytes(valueToHash);
byte[] bytesToHash = new byte[valueAsBytes.Length + salt.Length];
@@ -61,7 +62,7 @@ namespace DotNetOpenAuth.ApplicationBlock.Provider {
salt.CopyTo(bytesToHash, valueAsBytes.Length);
byte[] hash = this.Hasher.ComputeHash(bytesToHash);
string base64Hash = Convert.ToBase64String(hash);
- Uri anonymousIdentifier = AppendIdentifiers(this.BaseIdentifier, base64Hash);
+ Uri anonymousIdentifier = this.AppendIdentifiers(this.BaseIdentifier, base64Hash);
return anonymousIdentifier;
}
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/Provider/AuthenticationRequestExtensions.cs b/samples/DotNetOpenAuth.ApplicationBlock/Provider/AuthenticationRequestExtensions.cs
index 496b14b..a737d30 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/Provider/AuthenticationRequestExtensions.cs
+++ b/samples/DotNetOpenAuth.ApplicationBlock/Provider/AuthenticationRequestExtensions.cs
@@ -1,15 +1,16 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using DotNetOpenAuth.OpenId.Provider;
-using DotNetOpenAuth.OpenId;
+namespace DotNetOpenAuth.ApplicationBlock.Provider {
+ using System;
+ using DotNetOpenAuth.OpenId;
+ using DotNetOpenAuth.OpenId.Provider;
-namespace DotNetOpenAuth.ApplicationBlock.Provider {
public static class AuthenticationRequestExtensions {
/// <summary>
/// Removes all personally identifiable information from the positive assertion.
/// </summary>
+ /// <param name="request">The incoming authentication request.</param>
+ /// <param name="localIdentifier">The OP local identifier, before the anonymous hash is applied to it.</param>
+ /// <param name="anonymousIdentifierProvider">The anonymous identifier provider.</param>
+ /// <param name="pairwiseUnique">if set to <c>true</c> the anonymous identifier will be unique to the requesting relying party's realm.</param>
/// <remarks>
/// The openid.claimed_id and openid.identity values are hashed.
/// </remarks>
diff --git a/samples/OpenIdProviderMvc/Code/AnonymousIdentifierProvider.cs b/samples/OpenIdProviderMvc/Code/AnonymousIdentifierProvider.cs
index 4bda10f..2b9e01c 100644
--- a/samples/OpenIdProviderMvc/Code/AnonymousIdentifierProvider.cs
+++ b/samples/OpenIdProviderMvc/Code/AnonymousIdentifierProvider.cs
@@ -1,13 +1,9 @@
namespace OpenIdProviderMvc.Code {
using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using DotNetOpenAuth.OpenId.Provider;
- using DotNetOpenAuth.OpenId;
using System.Web.Security;
- using OpenIdProviderMvc.Models;
using DotNetOpenAuth.ApplicationBlock.Provider;
+ using DotNetOpenAuth.OpenId;
+ using OpenIdProviderMvc.Models;
internal class AnonymousIdentifierProvider : AnonymousIdentifierProviderBase {
internal AnonymousIdentifierProvider()
diff --git a/samples/OpenIdProviderMvc/Code/Util.cs b/samples/OpenIdProviderMvc/Code/Util.cs
index c9ec56a..6623952 100644
--- a/samples/OpenIdProviderMvc/Code/Util.cs
+++ b/samples/OpenIdProviderMvc/Code/Util.cs
@@ -13,6 +13,5 @@
return new Uri(HttpContext.Current.Request.Url, appPath + value);
}
-
}
}
diff --git a/samples/OpenIdProviderMvc/Controllers/OpenIdController.cs b/samples/OpenIdProviderMvc/Controllers/OpenIdController.cs
index bc5b705..e353268 100644
--- a/samples/OpenIdProviderMvc/Controllers/OpenIdController.cs
+++ b/samples/OpenIdProviderMvc/Controllers/OpenIdController.cs
@@ -5,11 +5,11 @@ namespace OpenIdProviderMvc.Controllers {
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
+ using DotNetOpenAuth.ApplicationBlock.Provider;
using DotNetOpenAuth.Messaging;
+ using DotNetOpenAuth.OpenId;
using DotNetOpenAuth.OpenId.Provider;
using OpenIdProviderMvc.Code;
- using DotNetOpenAuth.ApplicationBlock.Provider;
- using DotNetOpenAuth.OpenId;
public class OpenIdController : Controller {
internal static OpenIdProvider OpenIdProvider = new OpenIdProvider();
@@ -21,12 +21,12 @@ namespace OpenIdProviderMvc.Controllers {
[ValidateInput(false)]
public ActionResult PpidProvider() {
- return DoProvider(true);
+ return this.DoProvider(true);
}
[ValidateInput(false)]
public ActionResult Provider() {
- return DoProvider(false);
+ return this.DoProvider(false);
}
[Authorize]
@@ -62,7 +62,7 @@ namespace OpenIdProviderMvc.Controllers {
authReq.IsAuthenticated = false;
}
}
-
+
// TODO: Respond to AX/sreg extension requests here.
// We don't want to add these extension responses for anonymous identifiers
// because they could leak information about the user's identity.
diff --git a/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs b/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs
index dd8d897..b14aba1 100644
--- a/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs
+++ b/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs
@@ -17,7 +17,7 @@
} else {
this.emailLabel.Text = "unavailable";
}
- claimedIdLabel.Text = User.Identity.Name;
+ this.claimedIdLabel.Text = this.User.Identity.Name;
var contactsDocument = GoogleConsumer.GetContacts(Global.GoogleWebConsumer, State.GoogleAccessToken);
this.RenderContacts(contactsDocument);
}