Added sreg client javascript support for responses.
[dotnetoauth.git] / src / DotNetOpenAuth / OpenId / RelyingParty / OpenIdEventArgs.cs
blob4d68fcc3c845ae7fa4ffc296150f8168765e74a2
1 //-----------------------------------------------------------------------
2 // <copyright file="OpenIdEventArgs.cs" company="Andrew Arnott">
3 // Copyright (c) Andrew Arnott. All rights reserved.
4 // </copyright>
5 //-----------------------------------------------------------------------
7 namespace DotNetOpenAuth.OpenId.RelyingParty {
8 using System;
9 using System.Collections.Generic;
10 using System.Linq;
11 using System.Text;
12 using DotNetOpenAuth.Messaging;
14 /// <summary>
15 /// The event details passed to event handlers.
16 /// </summary>
17 public class OpenIdEventArgs : EventArgs {
18 /// <summary>
19 /// Initializes a new instance of the <see cref="OpenIdEventArgs"/> class
20 /// with minimal information of an incomplete or failed authentication attempt.
21 /// </summary>
22 /// <param name="request">The outgoing authentication request.</param>
23 internal OpenIdEventArgs(IAuthenticationRequest request) {
24 ErrorUtilities.VerifyArgumentNotNull(request, "request");
26 this.Request = request;
27 this.ClaimedIdentifier = request.ClaimedIdentifier;
28 this.IsDirectedIdentity = request.IsDirectedIdentity;
31 /// <summary>
32 /// Initializes a new instance of the <see cref="OpenIdEventArgs"/> class
33 /// with information on a completed authentication attempt
34 /// (whether that attempt was successful or not).
35 /// </summary>
36 /// <param name="response">The incoming authentication response.</param>
37 internal OpenIdEventArgs(IAuthenticationResponse response) {
38 ErrorUtilities.VerifyArgumentNotNull(response, "response");
40 this.Response = response;
41 this.ClaimedIdentifier = response.ClaimedIdentifier;
44 /// <summary>
45 /// Gets or sets a value indicating whether to cancel
46 /// the OpenID authentication and/or login process.
47 /// </summary>
48 public bool Cancel { get; set; }
50 /// <summary>
51 /// Gets the Identifier the user is claiming to own. Or null if the user
52 /// is using Directed Identity.
53 /// </summary>
54 public Identifier ClaimedIdentifier { get; private set; }
56 /// <summary>
57 /// Gets a value indicating whether the user has selected to let his Provider determine
58 /// the ClaimedIdentifier to use as part of successful authentication.
59 /// </summary>
60 public bool IsDirectedIdentity { get; private set; }
62 /// <summary>
63 /// Gets the details of the OpenID authentication request,
64 /// and allows for adding extensions.
65 /// </summary>
66 public IAuthenticationRequest Request { get; private set; }
68 /// <summary>
69 /// Gets the details of the OpenID authentication response.
70 /// </summary>
71 public IAuthenticationResponse Response { get; private set; }