blob: 2d23cfcb9d26b78f6d653fe81a0193abf5a9480f (
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
|
//-----------------------------------------------------------------------
// <copyright file="ISetupRequiredAuthenticationResponse.cs" company="Outercurve Foundation">
// Copyright (c) Outercurve Foundation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OpenId.RelyingParty {
using System;
using System.Diagnostics.Contracts;
/// <summary>
/// An interface to expose useful properties and functionality for handling
/// authentication responses that are returned from Immediate authentication
/// requests that require a subsequent request to be made in non-immediate mode.
/// </summary>
[ContractClass(typeof(ISetupRequiredAuthenticationResponseContract))]
public interface ISetupRequiredAuthenticationResponse {
/// <summary>
/// Gets the <see cref="Identifier"/> to pass to <see cref="OpenIdRelyingParty.CreateRequest(Identifier)"/>
/// in a subsequent authentication attempt.
/// </summary>
Identifier UserSuppliedIdentifier { get; }
}
/// <summary>
/// Code contract class for the <see cref="ISetupRequiredAuthenticationResponse"/> type.
/// </summary>
[ContractClassFor(typeof(ISetupRequiredAuthenticationResponse))]
internal abstract class ISetupRequiredAuthenticationResponseContract : ISetupRequiredAuthenticationResponse {
/// <summary>
/// Initializes a new instance of the <see cref="ISetupRequiredAuthenticationResponseContract"/> class.
/// </summary>
protected ISetupRequiredAuthenticationResponseContract() {
}
#region ISetupRequiredAuthenticationResponse Members
/// <summary>
/// Gets the <see cref="Identifier"/> to pass to <see cref="OpenIdRelyingParty.CreateRequest(Identifier)"/>
/// in a subsequent authentication attempt.
/// </summary>
Identifier ISetupRequiredAuthenticationResponse.UserSuppliedIdentifier {
get {
Requires.ValidState(((IAuthenticationResponse)this).Status == AuthenticationStatus.SetupRequired, OpenIdStrings.OperationOnlyValidForSetupRequiredState);
throw new System.NotImplementedException();
}
}
#endregion
}
}
|