Commit Graph
183 Commits
Author SHA1 Message Date
Gonzalo Paniagua Javier 44e73724f6 2006-08-14 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: set the Secure attribute of the authentication
	cookie when required.


svn path=/trunk/mcs/; revision=63729
2006-08-14 16:19:33 +00:00
Konstantin Triger 23a4ecd4f1 Ensure initialized, fix url mapping.
svn path=/trunk/mcs/; revision=62305
2006-07-06 09:48:02 +00:00
Chris Toshok 06d0f2af03 2006-05-03 Chris Toshok <[email protected]>
* SqlMembershipProvider.cs (GetAlg): move this here for the time
	being, as it's the only class that uses it.
	(HashAndBase64Encode): nuke.
	(EncryptAndBase64Encode): nuke.
	(Base64DecodeAndDecrypt): nuke.
	(DecryptPassword): new function.
	(EncryptPassword): new function.
	(ChangePassword): replace the switch with a call to
	EncodePassword.
	(ChangePasswordQuestionAndAnswer): same.
	(CreateUser): same.
	(ResetPassword): same.
	(ValidateUsingPassword): same.
	(ValidateUsingPasswordAnswer): same.
	(GetPassword): same, and throw MembershipPasswordException if the
	password answer is incorrect.

	* MembershipProvider.cs (InitVector): nuke this.  it's actually
	the salt from the database (for the sql provider, anyway).
	(EncodePassword): based on the password format, password, and
	salt, encode it.  Makes use of EncryptPassword.
	(DecodePassword): likewise for decoding, makes use of
	DecryptPassword.
	(DecryptPassword): revert this to throwing
	NotImplementedException, as the sql provideroverrides it to
	perform the actual decryption.
	(EncryptPassword): same.


svn path=/trunk/mcs/; revision=60240
2006-05-03 22:14:51 +00:00
Chris Toshok 9a371dee3b 2006-05-02 Chris Toshok <[email protected]>
* SqlMembershipProvider.cs: 85% complete, maybe more.  The major
	functionality should work.  Password retrieval (and encrypted
	passwords in general) is untested.


svn path=/trunk/mcs/; revision=60190
2006-05-02 18:09:49 +00:00
Chris Toshok 655febdcfa * Membership.cs (GeneratePassword): don't include quotes (',",`)
in the set of characters in the generated passwords.

2006-05-01  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=60133
2006-05-01 19:15:09 +00:00
Chris Toshok ae383bc1b6 * MembershipProvider.cs (GetAlg): switch from Exception to
ProviderException to match MS behavior (and fix the unit test.)

	* Membership.cs (GeneratePassword): implement.

2006-05-01  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=60131
2006-05-01 18:26:10 +00:00
Chris Toshok f570008c4c oops. committed the wrong revision
svn path=/trunk/mcs/; revision=60127
2006-05-01 17:55:08 +00:00
Chris Toshok f9bc30604e 2006-05-01 Chris Toshok <[email protected]>
* SqlMembershipProvider.cs: lots more work.  checking this in in
	its present state because I don't want to lose it.  It still needs
	work.
	
	* Membership.cs (.cctor): remove the fallback.
	(ValidatingPassword): remove the MonoTODO.

	* MembershipProvider.cs (DecryptPassword): implement.
	(EncryptPassword): implement.
	(GetAlg): helper function for Decrypt/EncryptPassword.
	(InitVector): same.

	* SqlMembershipProvider.cs (GeneratePassword): call
	Membership.GeneratePassword with the configured minimum strength
	requirements.
2006-04-27  Chris Toshok  <[email protected]>

	* SqlMembershipProvider.cs (UnlockUser): fix sql query, and move
	the CheckPararm call to the top of the method.


svn path=/trunk/mcs/; revision=60126
2006-05-01 17:49:10 +00:00
Chris Toshok 66273fce26 2006-04-27 Chris Toshok <[email protected]>
* SqlMembershipProvider.cs (UnlockUser): fix sql query.


svn path=/trunk/mcs/; revision=59992
2006-04-27 17:13:28 +00:00
Chris Toshok d874121651 2006-04-12 Chris Toshok <[email protected]>
* SqlMembershipProvider.cs: commit initial pass at
	SqlMembershipProvider work.  lots of stuff untested in here.


svn path=/trunk/mcs/; revision=59426
2006-04-12 21:50:41 +00:00
Chris Toshok 6d74239f6f 2006-04-11 Chris Toshok <[email protected]>
* MembershipUser.cs (.ctor): per Shackow's book, all DateTime's
	are converted using ToUniversalTime when passed into this class.
	(UpdateSelf): update ourselves from the passed in MembershipUser,
	swallowing NotSupportedExceptions.
	(UpdateUser): fetch a new MembershipUser from the db and call
	UpdateSelf with it.
	(ChangePassword): call UpdateUser after changing the password.
	(ChangePasswordQuestionAndAnswer): same.
	(ResetPassword): same.
	(UnlockUser): same.  Also, don't explicitly set isLockedOut.
	It'll be updated in UpdateSelf.
	(CreationDate): getter calls ToLocalTime, setter calls
	ToUniversalTime.
	(LastActivityDate): same.
	(LastLoginDate): same.
	(LastPasswordChangedDate): same.
	(LastLockoutDate): same.
	
	* Membership.cs (.cctor): use
	ProvidersHelper.InstantitateProviders, and remove some unnecessary
	#if NET_2_0's.


svn path=/trunk/mcs/; revision=59361
2006-04-11 14:47:04 +00:00
Chris Toshok 83e41f5ebf 2006-03-29 Chris Toshok <[email protected]>
* SqlRoleProvider.cs: do the LOWER's in SQL, not in C#.


svn path=/trunk/mcs/; revision=58754
2006-03-29 19:27:46 +00:00
Chris Toshok b457248728 move some sql text to the start of the methods, and add a MonoTODO to DeleteRole
svn path=/trunk/mcs/; revision=58391
2006-03-23 21:50:38 +00:00
Chris Toshok 74504b1a44 * Roles.cs: make this 2.0 configuration aware.
* SqlRoleProvider.cs: flesh out all the operations.  the only
	things that need dealing with are the Initialize method's handling
	of a few parameters, and the ApplicationName property.

2006-03-23  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=58390
2006-03-23 21:47:44 +00:00
Chris Toshok e1458fde12 2006-03-23 Chris Toshok <[email protected]>
* DefaultAuthenticationModule.cs (OnDefaultAuthentication): always
	set Thread.CurrentPrincipal, not just if we set it to the
	GenericPrincipal.


svn path=/trunk/mcs/; revision=58372
2006-03-23 18:09:36 +00:00
Chris Toshok d7f68f2310 2006-03-22 Chris Toshok <[email protected]>
* RoleManagerModule.cs: implement using info in Shackow's book.

	* RolePrincipal.cs: flesh this out a bit more.

	* DefaultAuthenticationModule.cs (OnDefaultAuthentication):
	according to Shackow's book, this sets Thread.CurrentPrincipal as
	well as HttpContext.Current.User.


svn path=/trunk/mcs/; revision=58318
2006-03-22 20:34:58 +00:00
Chris Toshok af89946383 In System.Web.Configuration.Internal:
2006-02-28  Chris Toshok  <[email protected]>

	* IInternalConfigWebHost.cs: corcompare work.

In System.Web.Configuration_2.0:
2006-02-28  Chris Toshok  <[email protected]>

	* BuildProviderAppliesTo.cs, PagesToCountAction.cs: nuke.

In System.Web.Profile:
2006-02-28  Chris Toshok  <[email protected]>

	* ProfileBase.cs: corcompare work.

	* SqlProfileProvider.cs: add stubbed out file.

In System.Web.SessionState:
2006-02-28  Chris Toshok  <[email protected]>

	* SessionStateActions.cs: rename SessionStateActionFlags to this.

	* ISessionIDManager.cs: rename ISessionIDModule to this.

	* IStateRuntime.cs: corcompare work.

In System.Web.Security:
2006-02-28  Chris Toshok  <[email protected]>

	* FormsAuthentication.cs: corcompare work.

	* MembershipCreateUserException.cs: same.

	* MembershipPasswordException.cs: same.

	* AnonymousIdentificationModule.cs: same.

In System.Web.Configuration:
2006-02-28  Chris Toshok  <[email protected]>

	* FormsAuthPasswordFormat.cs: ifdef out the [Serializable] in the
	2.0 case.

In System.Web.Hosting:
2006-02-28  Chris Toshok  <[email protected]>

	* IAppDomainFactory.cs: corcompare work.

	* IAppManagerAppDomainFactory.cs: same

	* IISAPIRuntime.cs: same.

In System.Web.Management:
2006-02-28  Chris Toshok  <[email protected]>

	* SqlFeatures.cs: corcompare work

	* IRegiisUtility.cs: same.

	* WebEventFormatter.cs: same.

	* RuleFiringRecord.cs: same.

	* SessionStateType.cs: same.

	* WebApplicationInformtion.cs: same.

	* EventNotificationType.cs: same.

	* WebBaseEvent.cs: same.

	* IRegisterCreateITypeLib.cs: nuke


svn path=/trunk/mcs/; revision=57413
2006-02-28 18:56:23 +00:00
Chris Toshok d6d83474bc 2006-02-01 Chris Toshok <[email protected]>
* FormsAuthentication.cs, Membership.cs,
	FormsAuthenticationModule.cs, UrlAuthorizationModule.cs: oops,
	replace GetWebApplicationSection with GetSection.


svn path=/trunk/mcs/; revision=56420
2006-02-01 20:23:02 +00:00
Chris Toshok 563964ae5f 2006-02-01 Chris Toshok <[email protected]>
* FormsAuthentication.cs: CONFIGURATION_2_0 => NET_2_0.
	simplifies the ifdef mess quite a bit.

	* Membership.cs: same.

	* FormsAuthenticationModule.cs: same.

	* UrlAuthorizationModule.cs: same.


svn path=/trunk/mcs/; revision=56406
2006-02-01 19:11:25 +00:00
Chris Toshok 549bff7332 2006-01-04 Chris Toshok <[email protected]>
* FormsAuthentication.cs (Authenticate): add CONFIGURATION_2_0
	code.
	(Decrypt2): same.
	(Decrypt): same.
	(Encrypt): same.
	(Initialize): same.


svn path=/trunk/mcs/; revision=55053
2006-01-04 16:23:45 +00:00
Chris Toshok bc2719fe9c 2006-01-04 Chris Toshok <[email protected]>
* Membership.cs (.cctor): enable the code here under
	CONFIGURATION_2_0.


svn path=/trunk/mcs/; revision=55043
2006-01-04 07:08:25 +00:00
Chris Toshok 371dbd5167 2006-01-03 Chris Toshok <[email protected]>
* UrlAuthorizationModule.cs (OnAuthorizeRequest): add
	CONFIGURATION_2_0 code here.


svn path=/trunk/mcs/; revision=55038
2006-01-04 01:09:02 +00:00
Gonzalo Paniagua Javier fc52c911d8 2005-12-22 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: don't end the request in
	RedirectFromLoginPage.


svn path=/trunk/mcs/; revision=54719
2005-12-22 04:19:55 +00:00
Gonzalo Paniagua Javier 203dbe820f 2005-12-22 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthenticationModule.cs: expire the cookie. Fixes bug #77043.
	Patch by Cyrille Colin.


svn path=/trunk/mcs/; revision=54717
2005-12-22 04:08:01 +00:00
Gonzalo Paniagua Javier 0ed5b8fe64 move reqPath into the try/catch too
svn path=/trunk/mcs/; revision=54361
2005-12-14 15:28:43 +00:00
Gonzalo Paniagua Javier 2823045f76 2005-12-13 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthenticationModule.cs: ignore any exception thrown when mapping
	the provided virtual path to the physical one. Patch by Cyrille Colin.


svn path=/trunk/mcs/; revision=54323
2005-12-13 21:31:23 +00:00
Chris Toshok 4ebea5593a 2005-11-28 Chris Toshok <[email protected]>
* FormsAuthenticationModule.cs (OnAuthenticateRequest):
	CONFIGURATION_2_0 work.
	(OnEndRequest): same.


svn path=/trunk/mcs/; revision=53581
2005-11-28 20:39:16 +00:00
Sebastien Pouliot 79f7f0a08c 2005-09-09 Sebastien Pouliot <[email protected]>
* DefaultAuthenticationEventArgs.cs: Added LinkDemand for Minimal.
	* DefaultAuthenticationModule.cs: Added LinkDemand for Minimal. Added
	Demand for UnmanagedCode on constructor.
	* FileAuthorizationModule.cs: Added LinkDemand for Minimal. Added 
	Demand for UnmanagedCode on constructor.
	* FormsAuthentication.cs: Added LinkDemand for Minimal.
	* FormsAuthenticationEventArgs.cs: Added LinkDemand for Minimal.
	* FormsAuthenticationModule.cs: Added LinkDemand for Minimal. Added 
	Demand for UnmanagedCode on constructor.
	* FormsAuthenticationTicket.cs: Added LinkDemand for Minimal.
	* FormsIdentity.cs: Added LinkDemand for Minimal.
	* PassportAuthenticationEventArgs.cs: Added LinkDemand for Minimal.
	* PassportAuthenticationModule.cs: Added LinkDemand for Minimal. Added
	Demand for UnmanagedCode on constructor.
	* PassportIdentity.cs: Added LinkDemand for Minimal. Added Demand for
	UnmanagedCode on constructor.
	* UrlAuthorizationModule.cs: Added LinkDemand for Minimal. Added 
	Demand for UnmanagedCode on constructor.
	* WindowsAuthenticationEventArgs.cs: Added LinkDemand for Minimal.
	* WindowsAuthenticationModule.cs: Added LinkDemand for Minimal. Added
	Demand for UnmanagedCode on constructor.


svn path=/trunk/mcs/; revision=49819
2005-09-09 19:00:26 +00:00
Sebastien Pouliot 1e9ae3aae1 2005-09-01 Sebastien Pouliot <[email protected]>
* FormsAuthenticationEventArgs.cs: Ensure the setter for User is 
	protected by a demand for ControlPrincipal.
	* PassportAuthenticationEventArgs.cs: Ensure the setter for User is
	protected by a demand for ControlPrincipal.
	* WindowsAuthenticationEventArgs.cs: Ensure the setter for User is 
	protected by a demand for ControlPrincipal.


svn path=/trunk/mcs/; revision=49286
2005-09-01 18:26:20 +00:00
Sebastien Pouliot 06a251828f Add
svn path=/trunk/mcs/; revision=48951
2005-08-26 23:02:43 +00:00
Miguel de Icaza 54079f764a Commit of changes to core files, on behalf of the team
svn path=/trunk/mcs/; revision=48944
2005-08-26 22:58:48 +00:00
Gonzalo Paniagua Javier f0cc2e8150 2005-07-28 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: allow hardware acceleration support if
	available. Sebastien dixit.


svn path=/trunk/mcs/; revision=47819
2005-07-28 19:47:18 +00:00
Gonzalo Paniagua Javier ce12797961 2005-07-26 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: the init_vector must be the same accross
	restarts, otherwise the cookie does not work even when a decryption
	key is provided. Initialize it to the bytes of the cookie name. Fixes
	bug #75635.


svn path=/trunk/mcs/; revision=47700
2005-07-26 14:39:51 +00:00
Eyal Alalouf 335c4876d3 Check for null config in FormsAuthenticationModule.OnAuthenticateRequest
svn path=/trunk/mcs/; revision=47655
2005-07-25 14:45:51 +00:00
Gonzalo Paniagua Javier 0ea93bc648 2005-07-25 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: my previous patch missed a "small" detail: it
	didn't include the verification key when computing/checking the
	validation hash. Now this is really a MAC or HMAC or...


svn path=/trunk/mcs/; revision=47632
2005-07-25 08:42:40 +00:00
Gonzalo Paniagua Javier 5386976789 2005-07-25 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs:
	* FormsAuthenticationTicket.cs: added support for validation and
	encryption of the auth. cookie and improved serialization of the ticket.


svn path=/trunk/mcs/; revision=47625
2005-07-25 05:49:40 +00:00
Lluis Sanchez 43778238c5 2005-07-01 Lluis Sanchez Gual <[email protected]>
* Membership.cs: Read provider info from the config file.


svn path=/trunk/mcs/; revision=46850
2005-07-01 18:33:48 +00:00
Ben Maurer b27c8e1534 remove .cvsignore from everywhere, as it is useless on svn
svn path=/trunk/mcs/; revision=46564
2005-06-27 15:55:58 +00:00
Lluis Sanchez c2a04b1212 2005-06-10 Lluis Sanchez Gual <[email protected]>
* MembershipUserCollection.cs:
	* MembershipPasswordException.cs:
	* RoleProviderCollection.cs:
	* ActiveDirectoryMembershipProvider.cs:
	* SqlMembershipProvider.cs:
	* MembershipProvider.cs:
	* SqlRoleProvider.cs:
	* Membership.cs:
	* MembershipUser.cs:
	* MembershipProviderCollection.cs:
	* Roles.cs:.
	* RoleProvider.cs: Track api changes in ASP.NET 2.0. Implemented
	some missing methods.
	
	* AccessRoleProvider.cs:
	* AccessMembershipProvider.cs: Removed.
	
	* MembershipCreateUserException.cs:
	* MembershipValidatePasswordEventHandler.cs:
	* ValidatePasswordEventArgs.cs: Implemented.


svn path=/trunk/mcs/; revision=45762
2005-06-10 15:30:39 +00:00
Sebastien Pouliot 91a3fc7f3a 2005-05-21 Sebastien Pouliot <[email protected]>
* FormsAuthentication.cs: Hash the UTF8 representation of the password
	strings (to be compatible with Microsoft implementation).


svn path=/trunk/mcs/; revision=44878
2005-05-22 00:12:13 +00:00
Gonzalo Paniagua Javier 1fba1be550 2005-04-20 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs:
	* PassportAuthenticationModule.cs:
	* WindowsAuthenticationModule.cs: removed warnings.


svn path=/trunk/mcs/; revision=43363
2005-04-20 22:21:19 +00:00
Gonzalo Paniagua Javier 96b51938b4 2005-03-11 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthenticationModule.cs: fix for bug 73545, which caused
	authentication not to work when the cookie was not persistent.
	Patch by Ilya Kharmatsky (Mainsoft).


svn path=/trunk/mcs/; revision=41675
2005-03-11 06:02:22 +00:00
Gonzalo Paniagua Javier 02e38ff57c undo r39947. See bugzilla #73073.
svn path=/trunk/mcs/; revision=41298
2005-03-01 00:33:29 +00:00
Gonzalo Paniagua Javier 55e297f89d 2005-02-23 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: make the string to be stored in a config.
	file uppercase... See bug #72557.


svn path=/trunk/mcs/; revision=41123
2005-02-24 00:10:26 +00:00
Gonzalo Paniagua Javier aaa9efd15a 2005-02-06 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: fixed typo when getting the hash for the 
	password in SHA1 and MD5. Thanks to Tadas Dailyda.
	Lock on a static object instead of typeof(FormsAuthentication).


svn path=/trunk/mcs/; revision=40212
2005-02-06 17:29:31 +00:00
Gonzalo Paniagua Javier 2ec2b9f43f 2005-02-01 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthenticationModule.cs: allow accessing other files in the
	directory where the login page is. Fixes bug #71871.


svn path=/trunk/mcs/; revision=39947
2005-02-01 22:20:49 +00:00
Lluis Sanchez c99594ef82 2004-11-18 Lluis Sanchez Gual <[email protected]>
* RoleProvider.cs, Roles.cs, SqlRoleProvider.cs, RoleProviderCollection.cs,
	AccessRoleProvider.cs: IRoleProvider has been renamed to ProviderBase.
	* IMembershipProvider.cs: Deleted.
	* MembershipProvider.cs, AccessMembershipProvider.cs, MembershipUser.cs,
	Membership.cs, ADMembershipProvider.cs, SqlMembershipProvider.cs
	MembershipProviderCollection.cs: MembershipProvider has been deleted
	and replaced by the abstract class MembershipProvider.
	* MembershipProviderCollection.cs: Minor fixes.
	* ADMembershipProvider.cs: Renamed to ActiveDirectoryMembershipProvider.cs.


svn path=/trunk/mcs/; revision=36274
2004-11-18 14:32:06 +00:00
Lluis Sanchez 71ca93f6de * RoleProviderCollection.cs, MembershipProviderCollection.cs:
Fixed warnings.

svn path=/trunk/mcs/; revision=36152
2004-11-15 22:21:27 +00:00
Raja R Harinath 97553bb62e cvs ignores, sorry about the spam
svn path=/trunk/mcs/; revision=33874
2004-09-14 09:59:51 +00:00
Gonzalo Paniagua Javier d5a52eb629 2004-08-23 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: patch by Jim Pease to fix the date on renewal.

svn path=/trunk/mcs/; revision=32708
2004-08-23 16:07:21 +00:00