blob: 678f69a1649dd71874078140c6de5db7d794e8de (
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
//-----------------------------------------------------------------------
// <copyright file="SimpleXrdsProviderEndpoint.cs" company="Andrew Arnott">
// Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OpenId.RelyingParty {
using System;
using System.Collections.ObjectModel;
using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.OpenId.Messages;
/// <summary>
/// A very simple IXrdsProviderEndpoint implementation for verifying that all positive
/// assertions (particularly unsolicited ones) are received from OP endpoints that
/// are deemed permissible by the host RP.
/// </summary>
internal class SimpleXrdsProviderEndpoint : IProviderEndpoint {
/// <summary>
/// Initializes a new instance of the <see cref="SimpleXrdsProviderEndpoint"/> class.
/// </summary>
/// <param name="positiveAssertion">The positive assertion.</param>
internal SimpleXrdsProviderEndpoint(PositiveAssertionResponse positiveAssertion) {
this.Uri = positiveAssertion.ProviderEndpoint;
this.Version = positiveAssertion.Version;
}
#region IProviderEndpoint Members
/// <summary>
/// Gets the detected version of OpenID implemented by the Provider.
/// </summary>
public Version Version { get; private set; }
/// <summary>
/// Gets the URL that the OpenID Provider receives authentication requests at.
/// </summary>
public Uri Uri { get; private set; }
/// <summary>
/// Checks whether the OpenId Identifier claims support for a given extension.
/// </summary>
/// <typeparam name="T">The extension whose support is being queried.</typeparam>
/// <returns>
/// True if support for the extension is advertised. False otherwise.
/// </returns>
/// <remarks>
/// Note that a true or false return value is no guarantee of a Provider's
/// support for or lack of support for an extension. The return value is
/// determined by how the authenticating user filled out his/her XRDS document only.
/// The only way to be sure of support for a given extension is to include
/// the extension in the request and see if a response comes back for that extension.
/// </remarks>
bool IProviderEndpoint.IsExtensionSupported<T>() {
throw new NotImplementedException();
}
/// <summary>
/// Checks whether the OpenId Identifier claims support for a given extension.
/// </summary>
/// <param name="extensionType">The extension whose support is being queried.</param>
/// <returns>
/// True if support for the extension is advertised. False otherwise.
/// </returns>
/// <remarks>
/// Note that a true or false return value is no guarantee of a Provider's
/// support for or lack of support for an extension. The return value is
/// determined by how the authenticating user filled out his/her XRDS document only.
/// The only way to be sure of support for a given extension is to include
/// the extension in the request and see if a response comes back for that extension.
/// </remarks>
bool IProviderEndpoint.IsExtensionSupported(Type extensionType) {
throw new NotImplementedException();
}
#endregion
}
}
|