summaryrefslogtreecommitdiffstats
path: root/samples/DotNetOpenAuth.ApplicationBlock
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-06-17 07:40:19 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-06-17 07:40:19 -0700
commit12f899e678cd5fdafcd9fac84fadcf91029db88c (patch)
treedf7aa91df22832757958eaf6e80de32699ddf904 /samples/DotNetOpenAuth.ApplicationBlock
parent0a8227a503dc39c1d14790dd31d9aaf1b00e81cb (diff)
downloadDotNetOpenAuth-12f899e678cd5fdafcd9fac84fadcf91029db88c.zip
DotNetOpenAuth-12f899e678cd5fdafcd9fac84fadcf91029db88c.tar.gz
DotNetOpenAuth-12f899e678cd5fdafcd9fac84fadcf91029db88c.tar.bz2
Added OpenID pluggable behaviors support, including a sample PPID generator.
Diffstat (limited to 'samples/DotNetOpenAuth.ApplicationBlock')
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj1
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/Provider/AuthenticationRequestExtensions.cs37
2 files changed, 0 insertions, 38 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj b/samples/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj
index b35fa29..9aae9ca 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj
+++ b/samples/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj
@@ -62,7 +62,6 @@
<Compile Include="OAuthIdentity.cs" />
<Compile Include="OAuthPrincipal.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Provider\AuthenticationRequestExtensions.cs" />
<Compile Include="TwitterConsumer.cs" />
<Compile Include="Util.cs" />
</ItemGroup>
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/Provider/AuthenticationRequestExtensions.cs b/samples/DotNetOpenAuth.ApplicationBlock/Provider/AuthenticationRequestExtensions.cs
deleted file mode 100644
index 8af72aa..0000000
--- a/samples/DotNetOpenAuth.ApplicationBlock/Provider/AuthenticationRequestExtensions.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-namespace DotNetOpenAuth.ApplicationBlock.Provider {
- using System;
- using DotNetOpenAuth.OpenId;
- using DotNetOpenAuth.OpenId.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>
- /// <remarks>
- /// The openid.claimed_id and openid.identity values are hashed.
- /// </remarks>
- public static void ScrubPersonallyIdentifiableInformation(this IAuthenticationRequest request, Identifier localIdentifier, IDirectedIdentityIdentifierProvider anonymousIdentifierProvider) {
- if (request == null) {
- throw new ArgumentNullException("request");
- }
- if (!request.IsDirectedIdentity) {
- throw new InvalidOperationException("This operation is supported only under identifier select (directed identity) scenarios.");
- }
- if (anonymousIdentifierProvider == null) {
- throw new ArgumentNullException("anonymousIdentifierProvider");
- }
- if (localIdentifier == null) {
- throw new ArgumentNullException("localIdentifier");
- }
-
- // When generating the anonymous identifiers, the openid.identity and openid.claimed_id
- // will always end up with matching values.
- var anonymousIdentifier = anonymousIdentifierProvider.GetIdentifier(localIdentifier, request.Realm);
- request.ClaimedIdentifier = anonymousIdentifier;
- request.LocalIdentifier = anonymousIdentifier;
- }
- }
-}