Ensure initialized, fix url mapping.
[mono.git] / mcs / class / System.Web / System.Web.Security / ChangeLog
1 2006-07-06      Konstantin Triger <kostat@mainsoft.com>
2
3         * FormsAuthentication.cs: Ensure initialized, fix url mapping.
4
5 2006-05-03  Chris Toshok  <toshok@ximian.com>
6
7         * SqlMembershipProvider.cs (GetAlg): move this here for the time
8         being, as it's the only class that uses it.
9         (HashAndBase64Encode): nuke.
10         (EncryptAndBase64Encode): nuke.
11         (Base64DecodeAndDecrypt): nuke.
12         (DecryptPassword): new function.
13         (EncryptPassword): new function.
14         (ChangePassword): replace the switch with a call to
15         EncodePassword.
16         (ChangePasswordQuestionAndAnswer): same.
17         (CreateUser): same.
18         (ResetPassword): same.
19         (ValidateUsingPassword): same.
20         (ValidateUsingPasswordAnswer): same.
21         (GetPassword): same, and throw MembershipPasswordException if the
22         password answer is incorrect.
23
24         * MembershipProvider.cs (InitVector): nuke this.  it's actually
25         the salt from the database (for the sql provider, anyway).
26         (EncodePassword): based on the password format, password, and
27         salt, encode it.  Makes use of EncryptPassword.
28         (DecodePassword): likewise for decoding, makes use of
29         DecryptPassword.
30         (DecryptPassword): revert this to throwing
31         NotImplementedException, as the sql provideroverrides it to
32         perform the actual decryption.
33         (EncryptPassword): same.
34
35 2006-05-02  Chris Toshok  <toshok@ximian.com>
36
37         * SqlMembershipProvider.cs: 85% complete, maybe more.  The major
38         functionality should work.  Password retrieval (and encrypted
39         passwords in general) is untested.
40
41 2006-05-01  Chris Toshok  <toshok@ximian.com>
42
43         * Membership.cs (GeneratePassword): don't include quotes (',",`)
44         in the set of characters in the generated passwords.
45
46 2006-05-01  Chris Toshok  <toshok@ximian.com>
47
48         * MembershipProvider.cs (GetAlg): switch from Exception to
49         ProviderException to match MS behavior (and fix the unit test.)
50
51         * Membership.cs (GeneratePassword): implement.
52
53 2006-05-01  Chris Toshok  <toshok@ximian.com>
54
55         * SqlMembershipProvider.cs: lots more work.  checking this in in
56         its present state because I don't want to lose it.  It still needs
57         work.
58         
59         * Membership.cs (.cctor): remove the fallback.
60         (ValidatingPassword): remove the MonoTODO.
61
62         * MembershipProvider.cs (DecryptPassword): implement.
63         (EncryptPassword): implement.
64         (GetAlg): helper function for Decrypt/EncryptPassword.
65         (InitVector): same.
66
67 2006-04-27  Chris Toshok  <toshok@ximian.com>
68
69         * SqlMembershipProvider.cs (GeneratePassword): call
70         Membership.GeneratePassword with the configured minimum strength
71         requirements.
72
73 2006-04-27  Chris Toshok  <toshok@ximian.com>
74
75         * SqlMembershipProvider.cs (UnlockUser): fix sql query, and move
76         the CheckPararm call to the top of the method.
77
78 2006-04-12  Chris Toshok  <toshok@ximian.com>
79
80         * SqlMembershipProvider.cs: commit initial pass at
81         SqlMembershipProvider work.  lots of stuff untested in here.
82
83 2006-04-11  Chris Toshok  <toshok@ximian.com>
84
85         * MembershipUser.cs (.ctor): per Shackow's book, all DateTime's
86         are converted using ToUniversalTime when passed into this class.
87         (UpdateSelf): update ourselves from the passed in MembershipUser,
88         swallowing NotSupportedExceptions.
89         (UpdateUser): fetch a new MembershipUser from the db and call
90         UpdateSelf with it.
91         (ChangePassword): call UpdateUser after changing the password.
92         (ChangePasswordQuestionAndAnswer): same.
93         (ResetPassword): same.
94         (UnlockUser): same.  Also, don't explicitly set isLockedOut.
95         It'll be updated in UpdateSelf.
96         (CreationDate): getter calls ToLocalTime, setter calls
97         ToUniversalTime.
98         (LastActivityDate): same.
99         (LastLoginDate): same.
100         (LastPasswordChangedDate): same.
101         (LastLockoutDate): same.
102         
103         * Membership.cs (.cctor): use
104         ProvidersHelper.InstantitateProviders, and remove some unnecessary
105         #if NET_2_0's.
106
107 2006-03-29  Chris Toshok  <toshok@ximian.com>
108
109         * SqlRoleProvider.cs: do the LOWER's in SQL, not in C#.
110
111 2006-03-23  Chris Toshok  <toshok@ximian.com>
112
113         * Roles.cs: make this 2.0 configuration aware.
114
115         * SqlRoleProvider.cs: flesh out all the operations.  the only
116         things that need dealing with are the Initialize method's handling
117         of a few parameters, and the ApplicationName property.
118
119 2006-03-23  Chris Toshok  <toshok@ximian.com>
120
121         * DefaultAuthenticationModule.cs (OnDefaultAuthentication): always
122         set Thread.CurrentPrincipal, not just if we set it to the
123         GenericPrincipal.
124
125 2006-03-22  Chris Toshok  <toshok@ximian.com>
126
127         * RoleManagerModule.cs: implement using info in Shackow's book.
128
129         * RolePrincipal.cs: flesh this out a bit more.
130
131         * DefaultAuthenticationModule.cs (OnDefaultAuthentication):
132         according to Shackow's book, this sets Thread.CurrentPrincipal as
133         well as HttpContext.Current.User.
134
135 2006-02-28  Chris Toshok  <toshok@ximian.com>
136
137         * FormsAuthentication.cs: corcompare work.
138
139         * MembershipCreateUserException.cs: same.
140
141         * MembershipPasswordException.cs: same.
142
143         * AnonymousIdentificationModule.cs: same.
144
145 2006-02-01  Chris Toshok  <toshok@ximian.com>
146
147         * FormsAuthentication.cs, Membership.cs,
148         FormsAuthenticationModule.cs, UrlAuthorizationModule.cs: oops,
149         replace GetWebApplicationSection with GetSection.
150         
151 2006-02-01  Chris Toshok  <toshok@ximian.com>
152
153         * FormsAuthentication.cs: CONFIGURATION_2_0 => NET_2_0.
154         simplifies the ifdef mess quite a bit.
155
156         * Membership.cs: same.
157
158         * FormsAuthenticationModule.cs: same.
159
160         * UrlAuthorizationModule.cs: same.
161
162 2006-01-04  Chris Toshok  <toshok@ximian.com>
163
164         * FormsAuthentication.cs (Authenticate): add CONFIGURATION_2_0
165         code.
166         (Decrypt2): same.
167         (Decrypt): same.
168         (Encrypt): same.
169         (Initialize): same.
170
171 2006-01-04  Chris Toshok  <toshok@ximian.com>
172
173         * Membership.cs (.cctor): enable the code here under
174         CONFIGURATION_2_0.
175
176 2006-01-03  Chris Toshok  <toshok@ximian.com>
177
178         * UrlAuthorizationModule.cs (OnAuthorizeRequest): add
179         CONFIGURATION_2_0 code here.
180
181 2005-12-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
182
183         * FormsAuthentication.cs: don't end the request in
184         RedirectFromLoginPage.
185
186 2005-12-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
187
188         * FormsAuthenticationModule.cs: expire the cookie. Fixes bug #77043.
189         Patch by Cyrille Colin.
190
191 2005-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
192
193         * FormsAuthenticationModule.cs: ignore any exception thrown when mapping
194         the provided virtual path to the physical one. Patch by Cyrille Colin.
195
196 2005-11-28  Chris Toshok  <toshok@ximian.com>
197
198         * FormsAuthenticationModule.cs (OnAuthenticateRequest):
199         CONFIGURATION_2_0 work.
200         (OnEndRequest): same.
201
202 2005-09-09  Sebastien Pouliot  <sebastien@ximian.com>
203
204         * DefaultAuthenticationEventArgs.cs: Added LinkDemand for Minimal.
205         * DefaultAuthenticationModule.cs: Added LinkDemand for Minimal. Added
206         Demand for UnmanagedCode on constructor.
207         * FileAuthorizationModule.cs: Added LinkDemand for Minimal. Added 
208         Demand for UnmanagedCode on constructor.
209         * FormsAuthentication.cs: Added LinkDemand for Minimal.
210         * FormsAuthenticationEventArgs.cs: Added LinkDemand for Minimal.
211         * FormsAuthenticationModule.cs: Added LinkDemand for Minimal. Added 
212         Demand for UnmanagedCode on constructor.
213         * FormsAuthenticationTicket.cs: Added LinkDemand for Minimal.
214         * FormsIdentity.cs: Added LinkDemand for Minimal.
215         * PassportAuthenticationEventArgs.cs: Added LinkDemand for Minimal.
216         * PassportAuthenticationModule.cs: Added LinkDemand for Minimal. Added
217         Demand for UnmanagedCode on constructor.
218         * PassportIdentity.cs: Added LinkDemand for Minimal. Added Demand for
219         UnmanagedCode on constructor.
220         * UrlAuthorizationModule.cs: Added LinkDemand for Minimal. Added 
221         Demand for UnmanagedCode on constructor.
222         * WindowsAuthenticationEventArgs.cs: Added LinkDemand for Minimal.
223         * WindowsAuthenticationModule.cs: Added LinkDemand for Minimal. Added
224         Demand for UnmanagedCode on constructor.
225
226 2005-09-01  Sebastien Pouliot  <sebastien@ximian.com>
227
228         * FormsAuthenticationEventArgs.cs: Ensure the setter for User is 
229         protected by a demand for ControlPrincipal.
230         * PassportAuthenticationEventArgs.cs: Ensure the setter for User is
231         protected by a demand for ControlPrincipal.
232         * WindowsAuthenticationEventArgs.cs: Ensure the setter for User is 
233         protected by a demand for ControlPrincipal.
234
235 2005-08-25  Sebastien Pouliot  <sebastien@ximian.com> 
236  
237         * FormsAuthentication.cs: With 2.0 we can get the default properties 
238         and call Initialize without a NRE.
239
240 2005-08-25  Sebastien Pouliot  <sebastien@ximian.com>
241
242         * ActiveDirectoryConnectionProtection.cs: New (2.0) enum.
243         * ActiveDirectoryMembershipProvider.cs: Fixed 2.0 API.
244         * AnonymousIdentificationEventArgs.cs: Fixed AnonymousID property case.
245         * AnonymousIdentificationModule.cs: Fixed 2.0 API.
246         * FileAuthorizationModule.cs: Added static CheckFileAccessForUser in 
247         2.0 profile (TODO).
248         * FormsAuthentication.cs: Added missing 2.0 properties with their 
249         default values.
250         * MembershipCreateStatus.cs: Fixed enum values/names.
251         * MembershipProvider.cs: Added stub for [Decrypt|Encrypt]Password. Both
252         methods don't seems to work without an active provider.
253         * PassportIdentity.cs: Added IDispose for 2.0 profile.
254         * Roles.cs: Added missing beta2 bits and default values (which are the
255         only things working without a role provider (web.config).
256         * RolePrincipal.cs: Fixed 2.0 API. Implemented a few bits.
257         * SqlRoleProvider.cs: Fixed 2.0 API.
258         * UrlAuthorizationModule.cs: Added static CheckUrlAccessForPrincipal in
259         2.0 profile (TODO).
260
261 2005-08-24  Sebastien Pouliot  <sebastien@ximian.com>
262
263         * MembershipUserCollection.cs: Fix exceptions.
264
265 2005-08-22  Sebastien Pouliot  <sebastien@ximian.com>
266
267         * FormsAuthentication.cs: Add some 2.0 stuff required for Login* 
268         controls to compile.
269
270 2005-08-18  Sebastien Pouliot  <sebastien@ximian.com>
271
272         * Membership.cs: Commented unworking parts of the .cctor to allow 
273         testing the Login control.
274         * MembershipProviderCollection.cs: Fixed exception handling.
275         * SqlMembershipProvider.cs: Don't throw NotImplementedException 
276         everywhere so Membership's .cctor (somewhat) works. Removed 
277         Description property (not in beta2).
278
279 2005-07-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
280
281         * FormsAuthentication.cs: allow hardware acceleration support if
282         available. Sebastien dixit.
283
284 2005-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
285
286         * FormsAuthentication.cs: the init_vector must be the same accross
287         restarts, otherwise the cookie does not work even when a decryption
288         key is provided. Initialize it to the bytes of the cookie name. Fixes
289         bug #75635.
290
291 2005-07-25  Eyal Alaluf <eyala@mainsoft.com>
292
293         * FormsAuthenticationModule.cs: Check for null config
294
295 2005-07-25  Miguel de Icaza  <miguel@novell.com>
296
297         * FormsAuthentication.cs (SignOut): Force the cookie to have it
298         expire in the past.
299
300 2005-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
301
302         * FormsAuthentication.cs: my previous patch missed a "small" detail: it
303         didn't include the verification key when computing/checking the
304         validation hash. Now this is really a MAC or HMAC or...
305
306 2005-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
307
308         * FormsAuthentication.cs:
309         * FormsAuthenticationTicket.cs: added support for validation and
310         encryption of the auth. cookie and improved serialization of the ticket.
311
312 2005-07-01  Lluis Sanchez Gual <lluis@novell.com>
313
314         * Membership.cs: Read provider info from the config file.
315
316 2005-06-10 Lluis Sanchez Gual <lluis@novell.com>
317
318         * MembershipUserCollection.cs:
319         * MembershipPasswordException.cs:
320         * RoleProviderCollection.cs:
321         * ActiveDirectoryMembershipProvider.cs:
322         * SqlMembershipProvider.cs:
323         * MembershipProvider.cs:
324         * SqlRoleProvider.cs:
325         * Membership.cs:
326         * MembershipUser.cs:
327         * MembershipProviderCollection.cs:
328         * Roles.cs:.
329         * RoleProvider.cs: Track api changes in ASP.NET 2.0. Implemented
330         some missing methods.
331         
332         * AccessRoleProvider.cs:
333         * AccessMembershipProvider.cs: Removed.
334         
335         * MembershipCreateUserException.cs:
336         * MembershipValidatePasswordEventHandler.cs:
337         * ValidatePasswordEventArgs.cs: Implemented.
338
339 2005-05-21  Sebastien Pouliot  <sebastien@ximian.com>
340
341         * FormsAuthentication.cs: Hash the UTF8 representation of the password
342         strings (to be compatible with Microsoft implementation).
343
344 2005-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
345
346         * FormsAuthentication.cs:
347         * PassportAuthenticationModule.cs:
348         * WindowsAuthenticationModule.cs: removed warnings.
349
350 2005-03-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
351
352         * FormsAuthenticationModule.cs: fix for bug 73545, which caused
353         authentication not to work when the cookie was not persistent.
354         Patch by Ilya Kharmatsky (Mainsoft).
355
356 2005-02-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
357
358         * FormsAuthentication.cs: make the string to be stored in a config.
359         file uppercase... See bug #72557.
360
361 2005-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
362
363         * FormsAuthentication.cs: fixed typo when getting the hash for the 
364         password in SHA1 and MD5. Thanks to Tadas Dailyda.
365         Lock on a static object instead of typeof(FormsAuthentication).
366
367 2004-11-18 Lluis Sanchez Gual <lluis@novell.com>
368
369         * RoleProvider.cs, Roles.cs, SqlRoleProvider.cs, RoleProviderCollection.cs,
370         AccessRoleProvider.cs: IRoleProvider has been renamed to ProviderBase.
371         * IMembershipProvider.cs: Deleted.
372         * MembershipProvider.cs, AccessMembershipProvider.cs, MembershipUser.cs,
373         Membership.cs, ADMembershipProvider.cs, SqlMembershipProvider.cs
374         MembershipProviderCollection.cs: MembershipProvider has been deleted
375         and replaced by the abstract class MembershipProvider.
376         * MembershipProviderCollection.cs: Minor fixes.
377         * ADMembershipProvider.cs: Renamed to ActiveDirectoryMembershipProvider.cs.
378
379 2004-11-15 Lluis Sanchez Gual <lluis@novell.com>
380
381         * RoleProviderCollection.cs, MembershipProviderCollection.cs: 
382         Fixed warnings.
383
384 2004-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
385
386         * FormsAuthentication.cs: patch by Jim Pease to fix the date on renewal.
387
388 2004-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
389
390         * FormsAuthenticationModule.cs: don't renew expired cookies. Only renew
391         the cookie if SlidingExpiration is set. Thanks to Jim Pease.
392
393 2004-08-03  Sanjay Gupta <gsanjay@novell.com>
394
395         * MembershipSortOptions.cs:
396         * MembershipPasswordFormat.cs:
397         * MembershipOnlineStatus.cs:
398         * MembershipCreateStatus.cs:
399         * CookieProtection.cs: minor modifications.
400
401 2004-06-12  Pedro Martnez Juli  <yoros@wanadoo.es>
402
403         * FormsAuthentication.cs: Undo last change.
404
405 2004-06-12  Pedro Martnez Juli  <yoros@wanadoo.es>
406
407         * FormsAuthentication.cs: go to loginUrl from web.config settings
408         before try with the default ones.
409
410 2004-06-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
411
412         * DefaultAuthenticationModule.cs: set the IPrincipal for this thread
413         once we have a user. Fixes bug #59683.
414
415 2004-04-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
416
417         * FormsAuthenticationModule.cs: re-read configuration files if needed
418         when determining if forms auth. is used.
419
420 2004-01-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
421
422         * FormsAuthentication.cs: added RequireSSL and SlidingExpiration.
423
424 2004-01-11  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
425
426         * PassportIdentity.cs: Added v 1.1 members
427
428 2003-11-25 Ben Maurer  <bmaurer@users.sourceforge.net>
429         
430         * AccessMembershipProvider.cs: New v2 file
431         * AccessRoleProvider.cs: New v2 file
432         * ADMembershipProvider.cs: New v2 file
433         * AnonymousIdentificationEventArgs.cs: New v2 file
434         * AnonymousIdentificationEventHandler.cs: New v2 file
435         * AnonymousIdentificationModule.cs: New v2 file
436         * CookieProtection.cs: New v2 file
437         * IMembershipProvider.cs: New v2 file
438         * IRoleProvider.cs: New v2 file
439         * Membership.cs: New v2 file
440         * MembershipCreateStatus.cs: New v2 file
441         * MembershipCreateUserException.cs: New v2 file
442         * MembershipOnlineStatus.cs: New v2 file
443         * MembershipPasswordException.cs: New v2 file
444         * MembershipPasswordFormat.cs: New v2 file
445         * MembershipProviderCollection.cs: New v2 file
446         * MembershipSortOptions.cs: New v2 file
447         * MembershipUser.cs: New v2 file
448         * MembershipUserCollection.cs: New v2 file
449         * RoleManagerEventArgs.cs: New v2 file
450         * RoleManagerEventHandler.cs: New v2 file
451         * RoleManagerModule.cs: New v2 file
452         * RolePrincipal.cs: New v2 file
453         * RoleProviderCollection.cs: New v2 file
454         * Roles.cs: New v2 file
455         * SqlMembershipProvider.cs: New v2 file
456         * SqlRoleProvider.cs: New v2 file
457
458 2003-11-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
459
460         * FormsAuthentication.cs: encoding updates.
461
462 2003-10-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
463
464         * FormsAuthenticationModule.cs: fixed for applications other than /.
465
466 2003-08-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
467
468         * UrlAuthorizationModule.cs: fixed description for status code.
469
470 2003-07-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
471
472         * FormsAuthenticationModule.cs: really renew the ticket. Thanks to
473         Jens Thiel <Jens@Thiel.DE>.
474
475 2003-02-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
476
477         * UrlAuthorizationModule.cs: tell the application not to run any other
478         step apart from EndRequest.
479
480 2003-02-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
481
482         * FormsAuthentication.cs: implemented RedirectFromLoginPage and
483         GetRedirectUrl.
484         
485         * FormsAuthenticationModule.cs: redirect to the login page when a 401
486         error happens.
487
488         * UrlAuthorizationModule.cs: check for valid user or render error page.
489
490 2003-01-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
491
492         * DefaultAuthenticationModule.cs: implemented. It just create a default 
493         unauthenticated user when no one else provided one.
494
495         * FormsAuthenticationModule.cs: removed debug output.
496
497 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
498
499         * FormsAuthenticationModule.cs: remove debug lines.
500
501 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
502
503         * FormsAuthentication.cs: return a null ticket when an exception is
504         thrown creating it. Implemented RenewTicketIfOld.
505
506         * FormsAuthenticationModule.cs: implemented event handlers for
507         AuthenticateRequest and EndRequest.
508
509         * FormsAuthenticationTicket.cs: implemented SetDates and Clone methods.
510
511 2002-12-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
512
513         * FormsAuthentication.cs: implemented GetAuthCookie, SetAuthCookie,
514         SignOut, FormsCookieName and FormsCookiePath.
515
516 2002-12-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
517
518         * FormsAuthentication.cs: implemented Authenticate, unencrypted Encrypt
519         and Decrypt, HashPasswordForStoringInConfigFile and Initialize.
520
521         * FormsAuthenticationTicket.cs: set cookiePath to the default when no
522         other provided.
523
524 2002-08-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
525
526         * DefaultAuthenticationEventHandler.cs:
527         * DefaultAuthenticationModule.cs:
528         * FileAuthorizationModule.cs:
529         * FormsAuthentication.cs:
530         * FormsAuthenticationEventArgs.cs:
531         * FormsAuthenticationEventHandler.cs:
532         * FormsAuthenticationModule.cs:
533         * FormsAuthenticationTicket.cs:
534         * FormsIdentity.cs:
535         * PassportAuthenticationEventArgs.cs:
536         * PassportAuthenticationEventHandler.cs:
537         * PassportAuthenticationModule.cs:
538         * PassportIdentity.cs:
539         * UrlAuthorizationModule.cs:
540         * WindowsAuthenticationEventArgs.cs:
541         * WindowsAuthenticationEventHandler.cs:
542         * WindowsAuthenticationModule.cs: new files. Some of them implemented,
543         some others stubbed out.
544
545 2002-06-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
546
547         * DefaultAuthenticationEventArgs.cs: added file.
548