2007-05-09 Igor Zelmanovich <igorz@mainsoft.com>
[mono.git] / mcs / class / System.Web / System.Web.Security / PassportIdentity.cs
1 //
2 // System.Web.Security.PassportIdentity.cs
3 //
4 // Authors:
5 //   Gonzalo Paniagua Javier (gonzalo@ximian.com)
6 //   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
7 //
8 // (C) 2002 Ximian, Inc (http://www.ximian.com)
9 // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30
31 using System.Security.Permissions;
32 using System.Security.Principal;
33
34 namespace System.Web.Security {
35
36         [MonoNotSupported ("")]
37         [MonoTODO("Not implemented")]
38         // CAS - no InheritanceDemand here as the class is sealed
39         [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
40 #if NET_2_0
41         public sealed class PassportIdentity : IIdentity, IDisposable {
42 #else
43         public sealed class PassportIdentity : IIdentity {
44 #endif
45                 [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
46                 public PassportIdentity ()
47                 {
48                 }
49
50                 ~PassportIdentity ()
51                 {
52                 }
53
54                 public string AuthUrl ()
55                 {
56                         return AuthUrl (null, -1, -1, null, -1, null, -1, -1);
57                 }
58
59 #if (!NET_1_0)
60                 public string AuthUrl (String strReturnUrl)
61                 {
62                         return AuthUrl (strReturnUrl, -1, -1, null, -1, null, -1, -1);
63                 }
64 #endif
65
66                 public string AuthUrl (string strReturnUrl,
67                                        int iTimeWindow,
68                                        bool fForceLogin,
69                                        string strCoBrandedArgs,
70                                        int iLangID,
71                                        string strNameSpace,
72                                        int iKPP,
73                                        bool bUseSecureAuth)
74                 {
75                         return AuthUrl (strReturnUrl, iTimeWindow, (fForceLogin ? 1 : 0), strCoBrandedArgs, iLangID, strNameSpace, iKPP, (bUseSecureAuth ? 1 : 0));
76                 }
77
78                 [MonoTODO("Not implemented")]
79                 public string AuthUrl (string strReturnUrl,
80                                        int iTimeWindow,
81                                        int iForceLogin,
82                                        string strCoBrandedArgs,
83                                        int iLangID,
84                                        string strNameSpace,
85                                        int iKPP,
86                                        int iUseSecureAuth)
87                 {
88                         throw new NotImplementedException ();
89                 }
90
91                 public string AuthUrl2 ()
92                 {
93                         return AuthUrl2 (null, -1, -1, null, -1, null, -1, -1);
94                 }
95
96 #if (!NET_1_0)
97                 public string AuthUrl2 (String strReturnUrl)
98                 {
99                         return AuthUrl2 (strReturnUrl, -1, -1, null, -1, null, -1, -1);
100                 }
101 #endif
102
103                 public string AuthUrl2 (string strReturnUrl,
104                                         int iTimeWindow,
105                                         bool fForceLogin,
106                                         string strCoBrandedArgs,
107                                         int iLangID,
108                                         string strNameSpace,
109                                         int iKPP,
110                                         bool bUseSecureAuth)
111                 {
112                         return AuthUrl2 (strReturnUrl, iTimeWindow, (fForceLogin ? 1 : 0), strCoBrandedArgs, iLangID, strNameSpace, iKPP, (bUseSecureAuth ? 1 : 0));
113                 }
114
115                 [MonoTODO("Not implemented")]
116                 public string AuthUrl2 (string strReturnUrl,
117                                         int iTimeWindow,
118                                         int iForceLogin,
119                                         string strCoBrandedArgs,
120                                         int iLangID,
121                                         string strNameSpace,
122                                         int iKPP,
123                                         int iUseSecureAuth)
124                 {
125                         throw new NotImplementedException ();
126                 }
127
128                 [MonoTODO("Not implemented")]
129                 public static string Compress (string strData)
130                 {
131                         throw new NotImplementedException ();
132                 }
133
134                 [MonoTODO("Not implemented")]
135                 public static bool CryptIsValid ()
136                 {
137                         throw new NotImplementedException ();
138                 }
139
140                 [MonoTODO("Not implemented")]
141                 public static int CryptPutHost (string strHost)
142                 {
143                         throw new NotImplementedException ();
144                 }
145
146                 [MonoTODO("Not implemented")]
147                 public static int CryptPutSite (string strSite)
148                 {
149                         throw new NotImplementedException ();
150                 }
151
152                 [MonoTODO("Not implemented")]
153                 public static string Decompress (string strData)
154                 {
155                         throw new NotImplementedException ();
156                 }
157
158                 [MonoTODO("Not implemented")]
159                 public static string Decrypt (string strData)
160                 {
161                         throw new NotImplementedException ();
162                 }
163
164                 [MonoTODO("Not implemented")]
165                 public static string Encrypt (string strData)
166                 {
167                         throw new NotImplementedException ();
168                 }
169
170                 [MonoTODO("Not implemented")]
171                 public object GetCurrentConfig (string strAttribute)
172                 {
173                         throw new NotImplementedException ();
174                 }
175
176                 [MonoTODO("Not implemented")]
177                 public string GetDomainAttribute (string strAttribute, int iLCID, string strDomain)
178                 {
179                         throw new NotImplementedException ();
180                 }
181
182                 [MonoTODO("Not implemented")]
183                 public string GetDomainFromMemberName (string strMemberName)
184                 {
185                         throw new NotImplementedException ();
186                 }
187
188                 public bool GetIsAuthenticated (int iTimeWindow, bool bForceLogin, bool bCheckSecure)
189                 {
190                         return this.GetIsAuthenticated (iTimeWindow, (bForceLogin ? 1 : 0), (bCheckSecure ? 1 : 0));
191                 }
192
193                 [MonoTODO("Not implemented")]
194                 public bool GetIsAuthenticated (int iTimeWindow, int iForceLogin, int iCheckSecure)
195                 {
196                         throw new NotImplementedException ();
197                 }
198
199                 public string GetLoginChallenge ()
200                 {
201                         return GetLoginChallenge (null, -1, -1, null, -1, null, -1, -1, null);
202                 }
203
204 #if (!NET_1_0)
205                 public string GetLoginChallenge (String strReturnUrl)
206                 {
207                         return GetLoginChallenge (strReturnUrl, -1, -1, null, -1, null, -1, -1, null);
208                 }
209 #endif
210
211                 [MonoTODO("Not implemented")]
212                 public string GetLoginChallenge (string szRetURL,
213                                                  int iTimeWindow,
214                                                  int fForceLogin,
215                                                  string szCOBrandArgs,
216                                                  int iLangID,
217                                                  string strNameSpace,
218                                                  int iKPP,
219                                                  int iUseSecureAuth,
220                                                  object oExtraParams)
221                 {
222                         throw new NotImplementedException ();
223                 }
224
225                 [MonoTODO("Not implemented")]
226                 public object GetOption (string strOpt)
227                 {
228                         throw new NotImplementedException ();
229                 }
230
231                 [MonoTODO("Not implemented")]
232                 public object GetProfileObject (string strProfileName)
233                 {
234                         throw new NotImplementedException ();
235                 }
236
237                 [MonoTODO("Not implemented")]
238                 public bool HasFlag (int iFlagMask)
239                 {
240                         throw new NotImplementedException ();
241                 }
242
243                 [MonoTODO("Not implemented")]
244                 public bool HasProfile (string strProfile)
245                 {
246                         throw new NotImplementedException ();
247                 }
248
249                 [MonoTODO("Not implemented")]
250                 public bool HaveConsent (bool bNeedFullConsent, bool bNeedBirthdate)
251                 {
252                         throw new NotImplementedException ();
253                 }
254
255                 public int LoginUser ()
256                 {
257                         return LoginUser (null, -1, -1, null, -1, null, -1, -1, null);
258                 }
259
260 #if (!NET_1_0)
261                 public int LoginUser (String strReturnUrl)
262                 {
263                         return LoginUser (strReturnUrl, -1, -1, null, -1, null, -1, -1, null);
264                 }
265 #endif
266
267                 public int LoginUser (string szRetURL,
268                                       int iTimeWindow,
269                                       bool fForceLogin,
270                                       string szCOBrandArgs,
271                                       int iLangID,
272                                       string strNameSpace,
273                                       int iKPP,
274                                       bool fUseSecureAuth,
275                                       object oExtraParams)
276                 {
277                         return LoginUser (szRetURL, iTimeWindow, (fForceLogin ? 1 : 0), szCOBrandArgs, iLangID, strNameSpace, iKPP, (fUseSecureAuth ? 1 : 0), null);
278                 }
279
280                 [MonoTODO("Not implemented")]
281                 public int LoginUser (string szRetURL,
282                                       int iTimeWindow,
283                                       int fForceLogin,
284                                       string szCOBrandArgs,
285                                       int iLangID,
286                                       string strNameSpace,
287                                       int iKPP,
288                                       int iUseSecureAuth,
289                                       object oExtraParams)
290                 {
291                         throw new NotImplementedException ();
292                 }
293
294                 public string LogoTag ()
295                 {
296                         return LogoTag (null, -1, -1, null, -1, -1, null, -1, -1);
297                 }
298
299 #if (!NET_1_0)
300                 public string LogoTag (String strReturnUrl)
301                 {
302                         return LogoTag (strReturnUrl, -1, -1, null, -1, -1, null, -1, -1);
303                 }
304 #endif
305
306                 public string LogoTag (string strReturnUrl,
307                                        int iTimeWindow,
308                                        bool fForceLogin,
309                                        string strCoBrandedArgs,
310                                        int iLangID,
311                                        bool fSecure,
312                                        string strNameSpace,
313                                        int iKPP,
314                                        bool bUseSecureAuth)
315                 {
316                         return LogoTag (strReturnUrl, iTimeWindow, (fForceLogin ? 1 : 0), strCoBrandedArgs, iLangID, (fSecure ? 1 : 0), strNameSpace, iKPP, (bUseSecureAuth ? 1 : 0));
317                 }
318
319                 [MonoTODO("Not implemented")]
320                 public string LogoTag (string strReturnUrl,
321                                        int iTimeWindow,
322                                        int iForceLogin,
323                                        string strCoBrandedArgs,
324                                        int iLangID,
325                                        int iSecure,
326                                        string strNameSpace,
327                                        int iKPP,
328                                        int iUseSecureAuth)
329                 {
330                         throw new NotImplementedException ();
331                 }
332
333                 public string LogoTag2 ()
334                 {
335                         return LogoTag2 (null, -1, -1, null, -1, -1, null, -1, -1);
336                 }
337
338 #if (!NET_1_0)
339                 public string LogoTag2 (String strReturnUrl)
340                 {
341                         return LogoTag2 (strReturnUrl, -1, -1, null, -1, -1, null, -1, -1);
342                 }
343 #endif
344
345                 public string LogoTag2 (string strReturnUrl,
346                                         int iTimeWindow,
347                                         bool fForceLogin,
348                                         string strCoBrandedArgs,
349                                         int iLangID,
350                                         bool fSecure,
351                                         string strNameSpace,
352                                         int iKPP,
353                                         bool bUseSecureAuth)
354                 {
355                         return LogoTag2 (strReturnUrl, iTimeWindow, (fForceLogin ? 1 : 0), strCoBrandedArgs, iLangID, (fSecure ? 1 : 0), strNameSpace, iKPP, (bUseSecureAuth ? 1 : 0));
356                 }
357
358                 [MonoTODO("Not implemented")]
359                 public string LogoTag2 (string strReturnUrl,
360                                         int iTimeWindow,
361                                         int iForceLogin,
362                                         string strCoBrandedArgs,
363                                         int iLangID,
364                                         int iSecure,
365                                         string strNameSpace,
366                                         int iKPP,
367                                         int iUseSecureAuth)
368                 {
369                         throw new NotImplementedException ();
370                 }
371
372                 public string LogoutURL ()
373                 {
374                         return LogoutURL (null, null, -1, null, -1);
375                 }
376
377                 [MonoTODO("Not implemented")]
378                 public string LogoutURL (string szReturnURL,
379                                          string szCOBrandArgs,
380                                          int iLangID,
381                                          string strDomain,
382                                          int iUseSecureAuth)
383                 {
384                         throw new NotImplementedException ();
385                 }
386
387                 [MonoTODO("Not implemented")]
388                 public void SetOption (string strOpt, object vOpt)
389                 {
390                         throw new NotImplementedException ();
391                 }
392
393                 [MonoTODO("Not implemented")]
394                 public static void SignOut (string strSignOutDotGifFileName)
395                 {
396                         throw new NotImplementedException ();
397                 }
398
399                 [MonoTODO("Not implemented")]
400                 public object Ticket (string strAttribute)
401                 {
402                         throw new NotImplementedException ();
403                 }
404
405                 [MonoTODO("Not implemented")]
406                 public string AuthenticationType
407                 {
408                         get {
409                                 throw new NotImplementedException ();
410                         }
411                 }
412
413                 [MonoTODO("Not implemented")]
414                 public int Error
415                 {
416                         get {
417                                 throw new NotImplementedException ();
418                         }
419                 }
420
421                 [MonoTODO("Not implemented")]
422                 public bool GetFromNetworkServer
423                 {
424                         get {
425                                 throw new NotImplementedException ();
426                         }
427                 }
428
429                 [MonoTODO("Not implemented")]
430                 public bool HasSavedPassword
431                 {
432                         get {
433                                 throw new NotImplementedException ();
434                         }
435                 }
436
437                 [MonoTODO("Not implemented")]
438                 public bool HasTicket
439                 {
440                         get {
441                                 throw new NotImplementedException ();
442                         }
443                 }
444
445                 [MonoTODO("Not implemented")]
446                 public string HexPUID
447                 {
448                         get {
449                                 throw new NotImplementedException ();
450                         }
451                 }
452
453                 [MonoTODO("Not implemented")]
454                 public bool IsAuthenticated
455                 {
456                         get {
457                                 throw new NotImplementedException ();
458                         }
459                 }
460
461                 [MonoTODO("Not implemented")]
462                 public string this [string strProfileName]
463                 {
464                         get {
465                                 throw new NotImplementedException ();
466                         }
467                 }
468
469                 [MonoTODO("Not implemented")]
470                 public string Name
471                 {
472                         get {
473                                 throw new NotImplementedException ();
474                         }
475                 }
476
477                 [MonoTODO("Not implemented")]
478                 public int TicketAge
479                 {
480                         get {
481                                 throw new NotImplementedException ();
482                         }
483                 }
484
485                 [MonoTODO("Not implemented")]
486                 public int TimeSinceSignIn
487                 {
488                         get {
489                                 throw new NotImplementedException ();
490                         }
491                 }
492
493 #if NET_2_0
494                 void IDisposable.Dispose ()
495                 {
496                 }
497 #endif
498         }
499 }
500