diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2011-08-09 07:53:51 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2011-08-09 07:53:51 -0700 |
commit | ef6957d6bf7698252895214eac7cb01d91775d6c (patch) | |
tree | 2ff9b7e0b6576cfb714dd51ae9ffc565a6b867b4 /src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/OpenIdMessageFactory.cs | |
parent | e0f42d23e06b693f2fa898d4605fea09d18354c6 (diff) | |
download | DotNetOpenAuth-ef6957d6bf7698252895214eac7cb01d91775d6c.zip DotNetOpenAuth-ef6957d6bf7698252895214eac7cb01d91775d6c.tar.gz DotNetOpenAuth-ef6957d6bf7698252895214eac7cb01d91775d6c.tar.bz2 |
Fixed up OpenIdInfoCardSelector button and the association response in the message factory.
Diffstat (limited to 'src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/OpenIdMessageFactory.cs')
-rw-r--r-- | src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/OpenIdMessageFactory.cs | 47 |
1 files changed, 2 insertions, 45 deletions
diff --git a/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/OpenIdMessageFactory.cs b/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/OpenIdMessageFactory.cs index 98bbffa..e73baa0 100644 --- a/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/OpenIdMessageFactory.cs +++ b/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/OpenIdMessageFactory.cs @@ -93,51 +93,8 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { /// A newly instantiated <see cref="IProtocolMessage"/>-derived object that this message can /// deserialize to. Null if the request isn't recognized as a valid protocol message. /// </returns> - public IDirectResponseProtocolMessage GetNewResponseMessage(IDirectedProtocolMessage request, IDictionary<string, string> fields) { - DirectResponseBase message = null; - - // Discern the OpenID version of the message. - Protocol protocol = Protocol.V11; - string ns; - if (fields.TryGetValue(Protocol.V20.openidnp.ns, out ns)) { - ErrorUtilities.VerifyProtocol(string.Equals(ns, Protocol.OpenId2Namespace, StringComparison.Ordinal), MessagingStrings.UnexpectedMessagePartValue, Protocol.V20.openidnp.ns, ns); - protocol = Protocol.V20; - } - - // Handle error messages generally. - if (fields.ContainsKey(protocol.openidnp.error)) { - message = new DirectErrorResponse(protocol.Version, request); - } - - var associateRequest = request as AssociateRequest; - if (associateRequest != null) { - if (protocol.Version.Major >= 2 && fields.ContainsKey(protocol.openidnp.error_code)) { - // This is a special recognized error case that we create a special message for. - message = new AssociateUnsuccessfulResponse(protocol.Version, associateRequest); - } else if (message == null) { - var associateDiffieHellmanRequest = request as AssociateDiffieHellmanRequest; - var associateUnencryptedRequest = request as AssociateUnencryptedRequest; - - if (associateDiffieHellmanRequest != null) { - ////message = new AssociateDiffieHellmanResponse(protocol.Version, associateDiffieHellmanRequest); - } - - if (associateUnencryptedRequest != null) { - message = new AssociateUnencryptedResponse(protocol.Version, associateUnencryptedRequest); - } - } - } - - var checkAuthenticationRequest = request as CheckAuthenticationRequest; - if (checkAuthenticationRequest != null && message == null) { - message = new CheckAuthenticationResponse(protocol.Version, checkAuthenticationRequest); - } - - if (message != null) { - message.SetAsIncoming(); - } - - return message; + public virtual IDirectResponseProtocolMessage GetNewResponseMessage(IDirectedProtocolMessage request, IDictionary<string, string> fields) { + return null; } #endregion |