summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Configuration/TrustedProviderEndpointConfigurationElement.cs
blob: 2576eb0ed9ea0775c86879d94c4f768f75c38dbb (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
//-----------------------------------------------------------------------
// <copyright file="TrustedProviderEndpointConfigurationElement.cs" company="Andrew Arnott">
//     Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOpenAuth.Configuration {
	using System;
	using System.Configuration;

	/// <summary>
	/// A configuration element that records a trusted Provider Endpoint.
	/// </summary>
	internal class TrustedProviderEndpointConfigurationElement : ConfigurationElement {
		/// <summary>
		/// The name of the attribute that stores the <see cref="ProviderEndpoint"/> value.
		/// </summary>
		private const string ProviderEndpointConfigName = "endpoint";

		/// <summary>
		/// Initializes a new instance of the <see cref="TrustedProviderEndpointConfigurationElement"/> class.
		/// </summary>
		public TrustedProviderEndpointConfigurationElement() {
		}

		/// <summary>
		/// Gets or sets the OpenID Provider Endpoint (aka "OP Endpoint") that this relying party trusts.
		/// </summary>
		[ConfigurationProperty(ProviderEndpointConfigName, IsRequired = true, IsKey = true)]
		public Uri ProviderEndpoint {
			get { return (Uri)this[ProviderEndpointConfigName]; }
			set { this[ProviderEndpointConfigName] = value; }
		}
	}
}