diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-02-08 21:23:41 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-02-08 21:23:41 -0800 |
commit | 1224fab92832edca08b58b971537b426abb02024 (patch) | |
tree | 41f328e2ea24004dbadc6a09c1f2ba79231a316f /src/DotNetOpenAuth/OpenId/Messages/DirectErrorResponse.cs | |
parent | df0be4ec15b713a1aa4aebc1fb73021f094ed8c0 (diff) | |
download | DotNetOpenAuth-1224fab92832edca08b58b971537b426abb02024.zip DotNetOpenAuth-1224fab92832edca08b58b971537b426abb02024.tar.gz DotNetOpenAuth-1224fab92832edca08b58b971537b426abb02024.tar.bz2 |
OpenID Provider now correctly assembles error response messages when ProtocolExceptions are caught.
Also added an ASP.NET hosted test to verify.
Diffstat (limited to 'src/DotNetOpenAuth/OpenId/Messages/DirectErrorResponse.cs')
-rw-r--r-- | src/DotNetOpenAuth/OpenId/Messages/DirectErrorResponse.cs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth/OpenId/Messages/DirectErrorResponse.cs b/src/DotNetOpenAuth/OpenId/Messages/DirectErrorResponse.cs index ed272d3..9731e43 100644 --- a/src/DotNetOpenAuth/OpenId/Messages/DirectErrorResponse.cs +++ b/src/DotNetOpenAuth/OpenId/Messages/DirectErrorResponse.cs @@ -5,6 +5,7 @@ //----------------------------------------------------------------------- namespace DotNetOpenAuth.OpenId.Messages { + using System; using DotNetOpenAuth.Messaging; /// <summary> @@ -14,7 +15,7 @@ namespace DotNetOpenAuth.OpenId.Messages { /// This message must be sent with an HTTP status code of 400. /// This class satisfies OpenID 2.0 section 5.1.2.2. /// </remarks> - internal class DirectErrorResponse : DirectResponseBase, IHttpDirectResponse { + internal class DirectErrorResponse : DirectResponseBase, IErrorMessage, IHttpDirectResponse { /// <summary> /// Initializes a new instance of the <see cref="DirectErrorResponse"/> class. /// </summary> @@ -23,6 +24,14 @@ namespace DotNetOpenAuth.OpenId.Messages { : base(originatingRequest) { } + /// <summary> + /// Initializes a new instance of the <see cref="DirectErrorResponse"/> class. + /// </summary> + /// <param name="version">The OpenID version this message should comply with.</param> + internal DirectErrorResponse(Version version) + : base(version) { + } + #region IHttpDirectResponse Members /// <summary> @@ -39,19 +48,19 @@ namespace DotNetOpenAuth.OpenId.Messages { /// Gets or sets a human-readable message indicating why the request failed. /// </summary> [MessagePart("error", IsRequired = true, AllowEmpty = true)] - internal string ErrorMessage { get; set; } + public string ErrorMessage { get; set; } /// <summary> /// Gets or sets the contact address for the administrator of the server. /// </summary> /// <value>The contact address may take any form, as it is intended to be displayed to a person. </value> [MessagePart("contact", IsRequired = false, AllowEmpty = true)] - internal string Contact { get; set; } + public string Contact { get; set; } /// <summary> /// Gets or sets a reference token, such as a support ticket number or a URL to a news blog, etc. /// </summary> [MessagePart("reference", IsRequired = false, AllowEmpty = true)] - internal string Reference { get; set; } + public string Reference { get; set; } } } |