//----------------------------------------------------------------------- // // Copyright (c) Outercurve Foundation. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.Messaging.Bindings { using System; /// /// Describes the contract a nonce store must fulfill. /// public interface INonceStore { /// /// Stores a given nonce and timestamp. /// /// The context, or namespace, within which the /// must be unique. /// The context SHOULD be treated as case-sensitive. /// The value will never be null but may be the empty string. /// A series of random characters. /// The UTC timestamp that together with the nonce string make it unique /// within the given . /// The timestamp may also be used by the data store to clear out old nonces. /// /// True if the context+nonce+timestamp (combination) was not previously in the database. /// False if the nonce was stored previously with the same timestamp and context. /// /// /// The nonce must be stored for no less than the maximum time window a message may /// be processed within before being discarded as an expired message. /// This maximum message age can be looked up via the /// /// property, accessible via the /// property. /// bool StoreNonce(string context, string nonce, DateTime timestampUtc); } }