New test.
[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         [MonoTODO]
37         // CAS - no InheritanceDemand here as the class is sealed
38         [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
39 #if NET_2_0
40         public sealed class PassportIdentity : IIdentity, IDisposable {
41 #else
42         public sealed class PassportIdentity : IIdentity {
43 #endif
44                 [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
45                 public PassportIdentity ()
46                 {
47                 }
48
49                 ~PassportIdentity ()
50                 {
51                 }
52
53                 public string AuthUrl ()
54                 {
55                         return AuthUrl (null, -1, -1, null, -1, null, -1, -1);
56                 }
57
58 #if (!NET_1_0)
59                 public string AuthUrl (String strReturnUrl)
60                 {
61                         return AuthUrl (strReturnUrl, -1, -1, null, -1, null, -1, -1);
62                 }
63 #endif
64
65                 public string AuthUrl (string strReturnUrl,
66                                        int iTimeWindow,
67                                        bool fForceLogin,
68                                        string strCoBrandedArgs,
69                                        int iLangID,
70                                        string strNameSpace,
71                                        int iKPP,
72                                        bool bUseSecureAuth)
73                 {
74                         return AuthUrl (strReturnUrl, iTimeWindow, (fForceLogin ? 1 : 0), strCoBrandedArgs, iLangID, strNameSpace, iKPP, (bUseSecureAuth ? 1 : 0));
75                 }
76
77                 [MonoTODO]
78                 public string AuthUrl (string strReturnUrl,
79                                        int iTimeWindow,
80                                        int iForceLogin,
81                                        string strCoBrandedArgs,
82                                        int iLangID,
83                                        string strNameSpace,
84                                        int iKPP,
85                                        int iUseSecureAuth)
86                 {
87                         throw new NotImplementedException ();
88                 }
89
90                 public string AuthUrl2 ()
91                 {
92                         return AuthUrl2 (null, -1, -1, null, -1, null, -1, -1);
93                 }
94
95 #if (!NET_1_0)
96                 public string AuthUrl2 (String strReturnUrl)
97                 {
98                         return AuthUrl2 (strReturnUrl, -1, -1, null, -1, null, -1, -1);
99                 }
100 #endif
101
102                 public string AuthUrl2 (string strReturnUrl,
103                                         int iTimeWindow,
104                                         bool fForceLogin,
105                                         string strCoBrandedArgs,
106                                         int iLangID,
107                                         string strNameSpace,
108                                         int iKPP,
109                                         bool bUseSecureAuth)
110                 {
111                         return AuthUrl2 (strReturnUrl, iTimeWindow, (fForceLogin ? 1 : 0), strCoBrandedArgs, iLangID, strNameSpace, iKPP, (bUseSecureAuth ? 1 : 0));
112                 }
113
114                 [MonoTODO]
115                 public string AuthUrl2 (string strReturnUrl,
116                                         int iTimeWindow,
117                                         int iForceLogin,
118                                         string strCoBrandedArgs,
119                                         int iLangID,
120                                         string strNameSpace,
121                                         int iKPP,
122                                         int iUseSecureAuth)
123                 {
124                         throw new NotImplementedException ();
125                 }
126
127                 [MonoTODO]
128                 public static string Compress (string strData)
129                 {
130                         throw new NotImplementedException ();
131                 }
132
133                 [MonoTODO]
134                 public static bool CryptIsValid ()
135                 {
136                         throw new NotImplementedException ();
137                 }
138
139                 [MonoTODO]
140                 public static int CryptPutHost (string strHost)
141                 {
142                         throw new NotImplementedException ();
143                 }
144
145                 [MonoTODO]
146                 public static int CryptPutSite (string strSite)
147                 {
148                         throw new NotImplementedException ();
149                 }
150
151                 [MonoTODO]
152                 public static string Decompress (string strData)
153                 {
154                         throw new NotImplementedException ();
155                 }
156
157                 [MonoTODO]
158                 public static string Decrypt (string strData)
159                 {
160                         throw new NotImplementedException ();
161                 }
162
163                 [MonoTODO]
164                 public static string Encrypt (string strData)
165                 {
166                         throw new NotImplementedException ();
167                 }
168
169                 [MonoTODO]
170                 public object GetCurrentConfig (string strAttribute)
171                 {
172                         throw new NotImplementedException ();
173                 }
174
175                 [MonoTODO]
176                 public string GetDomainAttribute (string strAttribute, int iLCID, string strDomain)
177                 {
178                         throw new NotImplementedException ();
179                 }
180
181                 [MonoTODO]
182                 public string GetDomainFromMemberName (string strMemberName)
183                 {
184                         throw new NotImplementedException ();
185                 }
186
187                 public bool GetIsAuthenticated (int iTimeWindow, bool bForceLogin, bool bCheckSecure)
188                 {
189                         return this.GetIsAuthenticated (iTimeWindow, (bForceLogin ? 1 : 0), (bCheckSecure ? 1 : 0));
190                 }
191
192                 [MonoTODO]
193                 public bool GetIsAuthenticated (int iTimeWindow, int iForceLogin, int iCheckSecure)
194                 {
195                         throw new NotImplementedException ();
196                 }
197
198                 public string GetLoginChallenge ()
199                 {
200                         return GetLoginChallenge (null, -1, -1, null, -1, null, -1, -1, null);
201                 }
202
203 #if (!NET_1_0)
204                 public string GetLoginChallenge (String strReturnUrl)
205                 {
206                         return GetLoginChallenge (strReturnUrl, -1, -1, null, -1, null, -1, -1, null);
207                 }
208 #endif
209
210                 [MonoTODO]
211                 public string GetLoginChallenge (string szRetURL,
212                                                  int iTimeWindow,
213                                                  int fForceLogin,
214                                                  string szCOBrandArgs,
215                                                  int iLangID,
216                                                  string strNameSpace,
217                                                  int iKPP,
218                                                  int iUseSecureAuth,
219                                                  object oExtraParams)
220                 {
221                         throw new NotImplementedException ();
222                 }
223
224                 [MonoTODO]
225                 public object GetOption (string strOpt)
226                 {
227                         throw new NotImplementedException ();
228                 }
229
230                 [MonoTODO]
231                 public object GetProfileObject (string strProfileName)
232                 {
233                         throw new NotImplementedException ();
234                 }
235
236                 [MonoTODO]
237                 public bool HasFlag (int iFlagMask)
238                 {
239                         throw new NotImplementedException ();
240                 }
241
242                 [MonoTODO]
243                 public bool HasProfile (string strProfile)
244                 {
245                         throw new NotImplementedException ();
246                 }
247
248                 [MonoTODO]
249                 public bool HaveConsent (bool bNeedFullConsent, bool bNeedBirthdate)
250                 {
251                         throw new NotImplementedException ();
252                 }
253
254                 public int LoginUser ()
255                 {
256                         return LoginUser (null, -1, -1, null, -1, null, -1, -1, null);
257                 }
258
259 #if (!NET_1_0)
260                 public int LoginUser (String strReturnUrl)
261                 {
262                         return LoginUser (strReturnUrl, -1, -1, null, -1, null, -1, -1, null);
263                 }
264 #endif
265
266                 public int LoginUser (string szRetURL,
267                                       int iTimeWindow,
268                                       bool fForceLogin,
269                                       string szCOBrandArgs,
270                                       int iLangID,
271                                       string strNameSpace,
272                                       int iKPP,
273                                       bool fUseSecureAuth,
274                                       object oExtraParams)
275                 {
276                         return LoginUser (szRetURL, iTimeWindow, (fForceLogin ? 1 : 0), szCOBrandArgs, iLangID, strNameSpace, iKPP, (fUseSecureAuth ? 1 : 0), null);
277                 }
278
279                 [MonoTODO]
280                 public int LoginUser (string szRetURL,
281                                       int iTimeWindow,
282                                       int fForceLogin,
283                                       string szCOBrandArgs,
284                                       int iLangID,
285                                       string strNameSpace,
286                                       int iKPP,
287                                       int iUseSecureAuth,
288                                       object oExtraParams)
289                 {
290                         throw new NotImplementedException ();
291                 }
292
293                 public string LogoTag ()
294                 {
295                         return LogoTag (null, -1, -1, null, -1, -1, null, -1, -1);
296                 }
297
298 #if (!NET_1_0)
299                 public string LogoTag (String strReturnUrl)
300                 {
301                         return LogoTag (strReturnUrl, -1, -1, null, -1, -1, null, -1, -1);
302                 }
303 #endif
304
305                 public string LogoTag (string strReturnUrl,
306                                        int iTimeWindow,
307                                        bool fForceLogin,
308                                        string strCoBrandedArgs,
309                                        int iLangID,
310                                        bool fSecure,
311                                        string strNameSpace,
312                                        int iKPP,
313                                        bool bUseSecureAuth)
314                 {
315                         return LogoTag (strReturnUrl, iTimeWindow, (fForceLogin ? 1 : 0), strCoBrandedArgs, iLangID, (fSecure ? 1 : 0), strNameSpace, iKPP, (bUseSecureAuth ? 1 : 0));
316                 }
317
318                 [MonoTODO]
319                 public string LogoTag (string strReturnUrl,
320                                        int iTimeWindow,
321                                        int iForceLogin,
322                                        string strCoBrandedArgs,
323                                        int iLangID,
324                                        int iSecure,
325                                        string strNameSpace,
326                                        int iKPP,
327                                        int iUseSecureAuth)
328                 {
329                         throw new NotImplementedException ();
330                 }
331
332                 public string LogoTag2 ()
333                 {
334                         return LogoTag2 (null, -1, -1, null, -1, -1, null, -1, -1);
335                 }
336
337 #if (!NET_1_0)
338                 public string LogoTag2 (String strReturnUrl)
339                 {
340                         return LogoTag2 (strReturnUrl, -1, -1, null, -1, -1, null, -1, -1);
341                 }
342 #endif
343
344                 public string LogoTag2 (string strReturnUrl,
345                                         int iTimeWindow,
346                                         bool fForceLogin,
347                                         string strCoBrandedArgs,
348                                         int iLangID,
349                                         bool fSecure,
350                                         string strNameSpace,
351                                         int iKPP,
352                                         bool bUseSecureAuth)
353                 {
354                         return LogoTag2 (strReturnUrl, iTimeWindow, (fForceLogin ? 1 : 0), strCoBrandedArgs, iLangID, (fSecure ? 1 : 0), strNameSpace, iKPP, (bUseSecureAuth ? 1 : 0));
355                 }
356
357                 [MonoTODO]
358                 public string LogoTag2 (string strReturnUrl,
359                                         int iTimeWindow,
360                                         int iForceLogin,
361                                         string strCoBrandedArgs,
362                                         int iLangID,
363                                         int iSecure,
364                                         string strNameSpace,
365                                         int iKPP,
366                                         int iUseSecureAuth)
367                 {
368                         throw new NotImplementedException ();
369                 }
370
371                 public string LogoutURL ()
372                 {
373                         return LogoutURL (null, null, -1, null, -1);
374                 }
375
376                 [MonoTODO]
377                 public string LogoutURL (string szReturnURL,
378                                          string szCOBrandArgs,
379                                          int iLangID,
380                                          string strDomain,
381                                          int iUseSecureAuth)
382                 {
383                         throw new NotImplementedException ();
384                 }
385
386                 [MonoTODO]
387                 public void SetOption (string strOpt, object vOpt)
388                 {
389                         throw new NotImplementedException ();
390                 }
391
392                 [MonoTODO]
393                 public static void SignOut (string strSignOutDotGifFileName)
394                 {
395                         throw new NotImplementedException ();
396                 }
397
398                 [MonoTODO]
399                 public object Ticket (string strAttribute)
400                 {
401                         throw new NotImplementedException ();
402                 }
403
404                 [MonoTODO]
405                 public string AuthenticationType
406                 {
407                         get {
408                                 throw new NotImplementedException ();
409                         }
410                 }
411
412                 [MonoTODO]
413                 public int Error
414                 {
415                         get {
416                                 throw new NotImplementedException ();
417                         }
418                 }
419
420                 [MonoTODO]
421                 public bool GetFromNetworkServer
422                 {
423                         get {
424                                 throw new NotImplementedException ();
425                         }
426                 }
427
428                 [MonoTODO]
429                 public bool HasSavedPassword
430                 {
431                         get {
432                                 throw new NotImplementedException ();
433                         }
434                 }
435
436                 [MonoTODO]
437                 public bool HasTicket
438                 {
439                         get {
440                                 throw new NotImplementedException ();
441                         }
442                 }
443
444                 [MonoTODO]
445                 public string HexPUID
446                 {
447                         get {
448                                 throw new NotImplementedException ();
449                         }
450                 }
451
452                 [MonoTODO]
453                 public bool IsAuthenticated
454                 {
455                         get {
456                                 throw new NotImplementedException ();
457                         }
458                 }
459
460                 [MonoTODO]
461                 public string this [string strProfileName]
462                 {
463                         get {
464                                 throw new NotImplementedException ();
465                         }
466                 }
467
468                 [MonoTODO]
469                 public string Name
470                 {
471                         get {
472                                 throw new NotImplementedException ();
473                         }
474                 }
475
476                 [MonoTODO]
477                 public int TicketAge
478                 {
479                         get {
480                                 throw new NotImplementedException ();
481                         }
482                 }
483
484                 [MonoTODO]
485                 public int TimeSinceSignIn
486                 {
487                         get {
488                                 throw new NotImplementedException ();
489                         }
490                 }
491
492 #if NET_2_0
493                 void IDisposable.Dispose ()
494                 {
495                 }
496 #endif
497         }
498 }
499