blob: d3e71e3cc954e9fe3c3a4ea158f8dcb3a8272618 (
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="ClientAccountUsernamePasswordFailedResponse.cs" company="Andrew Arnott">
// Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OAuthWrap.Messages {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using DotNetOpenAuth.Messaging;
/// <summary>
/// A response from the Authorization Server to the Client to indicate that a
/// request for an access code failed, probably due to an invalid account
/// name and password.
/// </summary>
internal class ClientAccountUsernamePasswordFailedResponse : MessageBase, IHttpDirectResponse {
/// <summary>
/// Initializes a new instance of the <see cref="ClientAccountUsernamePasswordFailedResponse"/> class.
/// </summary>
/// <param name="request">The request.</param>
internal ClientAccountUsernamePasswordFailedResponse(ClientAccountUsernamePasswordRequest request)
: base(request) {
}
#region IHttpDirectResponse Members
/// <summary>
/// Gets the HTTP status code that the direct respones should be sent with.
/// </summary>
/// <value><see cref="HttpStatusCode.Unauthorized"/></value>
HttpStatusCode IHttpDirectResponse.HttpStatusCode {
get { return HttpStatusCode.Unauthorized; }
}
/// <summary>
/// Gets the HTTP headers to add to the response.
/// </summary>
WebHeaderCollection IHttpDirectResponse.Headers {
get {
return new WebHeaderCollection() {
{ HttpResponseHeader.WwwAuthenticate, Protocol.HttpAuthorizationScheme },
};
}
}
#endregion
}
}
|