//----------------------------------------------------------------------- // // Copyright (c) Outercurve Foundation. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.ApplicationBlock.CustomExtensions { using System; using System.Collections.Generic; using System.Linq; using DotNetOpenAuth.Messaging; using DotNetOpenAuth.OpenId.Messages; [Serializable] public class AcmeResponse : IOpenIdMessageExtension { private IDictionary extraData = new Dictionary(); [MessagePart] public string FavoriteIceCream { get; set; } #region IOpenIdMessageExtension Members /// /// Gets the TypeURI the extension uses in the OpenID protocol and in XRDS advertisements. /// public string TypeUri { get { return Acme.CustomExtensionTypeUri; } } /// /// Gets the additional TypeURIs that are supported by this extension, in preferred order. /// May be empty if none other than is supported, but /// should not be null. /// /// /// Useful for reading in messages with an older version of an extension. /// The value in the property is always checked before /// trying this list. /// If you do support multiple versions of an extension using this method, /// consider adding a CreateResponse method to your request extension class /// so that the response can have the context it needs to remain compatible /// given the version of the extension in the request message. /// The for an example. /// public IEnumerable AdditionalSupportedTypeUris { get { return Enumerable.Empty(); } } public bool IsSignedByRemoteParty { get; set; } #endregion #region IMessage Members public Version Version { get { return Acme.Version; } } public IDictionary ExtraData { get { return this.extraData; } } public void EnsureValidMessage() { } #endregion } }