blob: e24a200962f714a830bdb4dca68784baa855da9f (
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
|
//-----------------------------------------------------------------------
// <copyright file="UserNamePasswordVerificationResponse.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 indicating that the user
/// must visit a URL to complete an additional verification step before proceeding.
/// </summary>
internal class UserNamePasswordVerificationResponse : MessageBase, IHttpDirectResponse {
/// <summary>
/// Initializes a new instance of the <see cref="UserNamePasswordVerificationResponse"/> class.
/// </summary>
/// <param name="request">The request.</param>
internal UserNamePasswordVerificationResponse(UserNamePasswordRequest request)
: base(request) {
}
#region IHttpDirectResponse Members
/// <summary>
/// Gets the HTTP status code that the direct response should be sent with.
/// </summary>
/// <value><see cref="HttpStatusCode.BadRequest"/></value>
HttpStatusCode IHttpDirectResponse.HttpStatusCode {
get { return HttpStatusCode.BadRequest; }
}
/// <summary>
/// Gets the HTTP headers to add to the response.
/// </summary>
WebHeaderCollection IHttpDirectResponse.Headers {
get { return new WebHeaderCollection(); }
}
#endregion
/// <summary>
/// Gets or sets the verification URL the user must visit with a browser
/// to complete some step to defeat automated attacks.
/// </summary>
/// <value>The verification URL.</value>
[MessagePart(Protocol.code, IsRequired = true, AllowEmpty = false)]
internal Uri VerificationUrl { get; set; }
}
}
|