2004-01-27 Nick Drochak <ndrochak@ieee.org>
[mono.git] / mcs / class / System / System.Net / NetworkCredential.cs
1 //
2 // System.Net.NetworkCredential.cs
3 //
4 // Author: Duncan Mak (duncan@ximian.com)
5 //
6 // (C) Ximian, Inc.
7 //
8
9 namespace System.Net
10 {
11         public class NetworkCredential : ICredentials
12         {
13                 // Fields
14                 string userName;
15                 string password;
16                 string domain;
17                 
18                 // Constructors
19                 public NetworkCredential ()
20                         : base ()
21                 {
22                 }
23
24                 public NetworkCredential (string userName, string password)
25                 {
26                         this.userName = userName;
27                         this.password = password;
28                 }
29
30                 public NetworkCredential (string userName, string password, string domain)
31                 {
32                         this.userName = userName;
33                         this.password = password;
34                         this.domain = domain;
35                 }
36
37                 // Properties
38
39                 public string Domain
40                 {
41                         get { return domain; }
42                         set { domain = value; }
43                 }
44
45                 public string UserName
46                 {
47                         get { return userName; }
48                         set { userName = value; }                       
49                 }
50
51                 public string Password
52                 {
53                         get { return password; }
54                         set { password = value; }
55                 }
56
57                 public NetworkCredential GetCredential (Uri uri, string authType)
58                 {
59                         return this;
60                 }                                       
61         }
62 }