//-----------------------------------------------------------------------
//
// Copyright (c) Andrew Arnott. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOAuth.Messaging {
using System;
using System.Collections.Generic;
using System.Text;
///
/// The interface that classes must implement to be serialized/deserialized
/// as OAuth messages.
///
public interface IProtocolMessage {
///
/// Gets the version of the protocol this message is prepared to implement.
///
Version ProtocolVersion { get; }
///
/// Gets the level of protection this message requires.
///
MessageProtection RequiredProtection { get; }
///
/// Gets a value indicating whether this is a direct or indirect message.
///
MessageTransport Transport { get; }
///
/// Gets the extra, non-OAuth parameters included in the message.
///
///
/// Implementations of this interface should ensure that this property never returns null.
///
IDictionary ExtraData { get; }
///
/// Checks the message state for conformity to the protocol specification
/// and throws an exception if the message is invalid.
///
///
/// Some messages have required fields, or combinations of fields that must relate to each other
/// in specialized ways. After deserializing a message, this method checks the state of the
/// message to see if it conforms to the protocol.
/// Note that this property should not check signatures or perform any state checks
/// outside this scope of this particular message.
///
/// Thrown if the message is invalid.
void EnsureValidMessage();
}
}