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