//-----------------------------------------------------------------------
//
// Copyright (c) Outercurve Foundation. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OAuth.ChannelElements {
using System;
using System.Security.Cryptography.X509Certificates;
///
/// A description of a consumer from a Service Provider's point of view.
///
public interface IConsumerDescription {
///
/// Gets the Consumer key.
///
string Key { get; }
///
/// Gets the consumer secret.
///
string Secret { get; }
///
/// Gets the certificate that can be used to verify the signature of an incoming
/// message from a Consumer.
///
/// The public key from the Consumer's X.509 Certificate, if one can be found; otherwise null.
///
/// This property must be implemented only if the RSA-SHA1 algorithm is supported by the Service Provider.
///
X509Certificate2 Certificate { get; }
///
/// Gets the callback URI that this consumer has pre-registered with the service provider, if any.
///
/// A URI that user authorization responses should be directed to; or null if no preregistered callback was arranged.
Uri Callback { get; }
///
/// Gets the verification code format that is most appropriate for this consumer
/// when a callback URI is not available.
///
/// A set of characters that can be easily keyed in by the user given the Consumer's
/// application type and form factor.
///
/// The value should NEVER be returned
/// since this property is only used in no callback scenarios anyway.
///
VerificationCodeFormat VerificationCodeFormat { get; }
///
/// Gets the length of the verification code to issue for this Consumer.
///
/// A positive number, generally at least 4.
int VerificationCodeLength { get; }
}
}