blob: c92ecc751a6a14d55c85598e322642668752326e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
//-----------------------------------------------------------------------
// <copyright file="IAuthorizationServer.cs" company="Andrew Arnott">
// Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
using DotNetOpenAuth.Messaging.Bindings;
namespace DotNetOpenAuth.OAuthWrap {
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using DotNetOpenAuth.OAuth.ChannelElements;
[ContractClass(typeof(IAuthorizationServerContract))]
public interface IAuthorizationServer {
IConsumerDescription GetClient(string clientIdentifier);
byte[] Secret { get; }
INonceStore VerificationCodeNonceStore { get; }
}
[ContractClassFor(typeof(IAuthorizationServer))]
internal abstract class IAuthorizationServerContract : IAuthorizationServer {
private IAuthorizationServerContract() {
}
IConsumerDescription IAuthorizationServer.GetClient(string clientIdentifier) {
Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(clientIdentifier));
Contract.Ensures(Contract.Result<IConsumerDescription>() != null);
throw new NotImplementedException();
}
byte[] IAuthorizationServer.Secret {
get {
Contract.Ensures(Contract.Result<byte[]>() != null);
throw new NotImplementedException();
}
}
INonceStore IAuthorizationServer.VerificationCodeNonceStore {
get {
Contract.Ensures(Contract.Result<INonceStore>() != null);
throw new NotImplementedException();
}
}
}
}
|