diff options
author | Jo Shields <jo.shields@xamarin.com> | 2015-02-06 18:17:54 +0300 |
---|---|---|
committer | Jo Shields <jo.shields@xamarin.com> | 2015-02-06 18:17:54 +0300 |
commit | eb53f821118958307371da9c44c2a89555060371 (patch) | |
tree | 7a2df117ff8085e0456c1871c4a6a30e37d4d393 /mcs/class/System.Web | |
parent | 375b749fca164b9ed3cbf521a78f64a397a39219 (diff) |
Move files which were split out from System.Web into System.Web.ApplicationServices into the latter's directory. They no longer need to be in the former, since we no longer build the 2.0 profile they were originally part of. This fixes "no rule to make target" errors on tarball builds, caused by those files no longer being shipped in tarballs (make dist does not traverse a ../ boundary, so it wasn't enough for them to be listed in System.Web.ApplicationServices' manifest by System.Web's folder)
Diffstat (limited to 'mcs/class/System.Web')
13 files changed, 0 insertions, 1206 deletions
diff --git a/mcs/class/System.Web/System.Web.Security/MembershipCreateStatus.cs b/mcs/class/System.Web/System.Web.Security/MembershipCreateStatus.cs deleted file mode 100644 index 71fddb48a04..00000000000 --- a/mcs/class/System.Web/System.Web.Security/MembershipCreateStatus.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// System.Web.Security.MembershipCreateStatus -// -// Authors: -// Ben Maurer (bmaurer@users.sourceforge.net) -// -// (C) 2003 Ben Maurer -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System.Runtime.CompilerServices; - -namespace System.Web.Security -{ - [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] - public enum MembershipCreateStatus - { - Success, - InvalidUserName, - InvalidPassword, - InvalidQuestion, - InvalidAnswer, - InvalidEmail, - DuplicateUserName, - DuplicateEmail, - UserRejected, - InvalidProviderUserKey, - DuplicateProviderUserKey, - ProviderError - } -} - - diff --git a/mcs/class/System.Web/System.Web.Security/MembershipCreateUserException.cs b/mcs/class/System.Web/System.Web.Security/MembershipCreateUserException.cs deleted file mode 100644 index a5f9e31a70e..00000000000 --- a/mcs/class/System.Web/System.Web.Security/MembershipCreateUserException.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// System.Web.Security.MembershipCreateUserException -// -// Authors: -// Ben Maurer (bmaurer@users.sourceforge.net) -// -// (C) 2003 Ben Maurer -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Runtime.Serialization; -using System.Runtime.CompilerServices; - -namespace System.Web.Security -{ - [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] - [Serializable] - public class MembershipCreateUserException : Exception - { - MembershipCreateStatus statusCode; - - public MembershipCreateUserException () - { - } - - public MembershipCreateUserException (string message): base (message) - { - } - - public MembershipCreateUserException (string message, Exception innerException): base (message, innerException) - { - } - - protected MembershipCreateUserException (SerializationInfo info, StreamingContext context): base (info, context) - { - info.AddValue ("statusCode", statusCode); - } - - public MembershipCreateUserException (MembershipCreateStatus statusCode) : base (statusCode.ToString ()) - { - this.statusCode = statusCode; - } - - public override void GetObjectData (SerializationInfo info, StreamingContext ctx) - { - base.GetObjectData (info, ctx); - statusCode = (MembershipCreateStatus) info.GetValue ("statusCode", typeof(MembershipCreateStatus)); - } - - public MembershipCreateStatus StatusCode { - get { return statusCode; } - } - } -} - - diff --git a/mcs/class/System.Web/System.Web.Security/MembershipPasswordException.cs b/mcs/class/System.Web/System.Web.Security/MembershipPasswordException.cs deleted file mode 100644 index 5bf60eb9080..00000000000 --- a/mcs/class/System.Web/System.Web.Security/MembershipPasswordException.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// System.Web.Security.MembershipPasswordException -// -// Authors: -// Ben Maurer (bmaurer@users.sourceforge.net) -// -// (C) 2003 Ben Maurer -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Runtime.Serialization; -using System.Runtime.CompilerServices; - -namespace System.Web.Security -{ - [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] - [Serializable] - public class MembershipPasswordException : Exception - { - public MembershipPasswordException () : base () {} - public MembershipPasswordException (string message) : base (message) {} - public MembershipPasswordException (string message, Exception innerException) : base (message, innerException) {} - - protected MembershipPasswordException (SerializationInfo info, StreamingContext context): base (info, context) - { - } - } -} - - diff --git a/mcs/class/System.Web/System.Web.Security/MembershipPasswordFormat.cs b/mcs/class/System.Web/System.Web.Security/MembershipPasswordFormat.cs deleted file mode 100644 index 294861808d9..00000000000 --- a/mcs/class/System.Web/System.Web.Security/MembershipPasswordFormat.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// System.Web.Security.MembershipPasswordFormat -// -// Authors: -// Ben Maurer (bmaurer@users.sourceforge.net) -// -// (C) 2003 Ben Maurer -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System.Runtime.CompilerServices; - -namespace System.Web.Security -{ - [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] - public enum MembershipPasswordFormat - { - Clear = 0, - Hashed = 1, - Encrypted = 2 - } -} - - diff --git a/mcs/class/System.Web/System.Web.Security/MembershipProvider.cs b/mcs/class/System.Web/System.Web.Security/MembershipProvider.cs deleted file mode 100644 index 068e1c45ccf..00000000000 --- a/mcs/class/System.Web/System.Web.Security/MembershipProvider.cs +++ /dev/null @@ -1,137 +0,0 @@ -// -// System.Web.Security.MembershipProvider -// -// Authors: -// Ben Maurer (bmaurer@users.sourceforge.net) -// Lluis Sanchez Gual (lluis@novell.com) -// -// (C) 2003 Ben Maurer -// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.ComponentModel; -using System.Configuration.Provider; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Text; -using System.Web.Configuration; - -namespace System.Web.Security -{ - [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] - public abstract class MembershipProvider : ProviderBase - { - const string HELPER_TYPE_NAME = "System.Web.Security.MembershipHelper, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; - - internal static IMembershipHelper Helper { - get { return helper; } - } - static IMembershipHelper helper; - - static readonly object validatingPasswordEvent = new object (); - - EventHandlerList events = new EventHandlerList (); - public event MembershipValidatePasswordEventHandler ValidatingPassword { - add { events.AddHandler (validatingPasswordEvent, value); } - remove { events.RemoveHandler (validatingPasswordEvent, value); } - } - - static MembershipProvider () - { - Type type = Type.GetType (HELPER_TYPE_NAME, false); - if (type == null) - return; - - try { - helper = Activator.CreateInstance (type) as IMembershipHelper; - } catch { - // ignore - } - } - - protected MembershipProvider () - { - } - - public abstract bool ChangePassword (string name, string oldPwd, string newPwd); - public abstract bool ChangePasswordQuestionAndAnswer (string name, string password, string newPwdQuestion, string newPwdAnswer); - public abstract MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status); - public abstract bool DeleteUser (string name, bool deleteAllRelatedData); - public abstract MembershipUserCollection FindUsersByEmail (string emailToMatch, int pageIndex, int pageSize, out int totalRecords); - public abstract MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords); - public abstract MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords); - public abstract int GetNumberOfUsersOnline (); - public abstract string GetPassword (string name, string answer); - public abstract MembershipUser GetUser (string name, bool userIsOnline); - public abstract MembershipUser GetUser (object providerUserKey, bool userIsOnline); - public abstract string GetUserNameByEmail (string email); - public abstract string ResetPassword (string name, string answer); - public abstract void UpdateUser (MembershipUser user); - public abstract bool ValidateUser (string name, string password); - public abstract bool UnlockUser (string userName); - - public abstract string ApplicationName { get; set; } - public abstract bool EnablePasswordReset { get; } - public abstract bool EnablePasswordRetrieval { get; } - public abstract bool RequiresQuestionAndAnswer { get; } - public abstract int MaxInvalidPasswordAttempts { get; } - public abstract int MinRequiredNonAlphanumericCharacters { get; } - public abstract int MinRequiredPasswordLength { get; } - public abstract int PasswordAttemptWindow { get; } - public abstract MembershipPasswordFormat PasswordFormat { get; } - public abstract string PasswordStrengthRegularExpression { get; } - public abstract bool RequiresUniqueEmail { get; } - - protected virtual void OnValidatingPassword (ValidatePasswordEventArgs args) - { - MembershipValidatePasswordEventHandler eh = events [validatingPasswordEvent] as MembershipValidatePasswordEventHandler; - if (eh != null) - eh (this, args); - } - - protected virtual byte [] DecryptPassword (byte [] encodedPassword) - { - if (helper == null) - throw new PlatformNotSupportedException ("This method is not available."); - return helper.DecryptPassword (encodedPassword); - } - - protected virtual byte[] EncryptPassword (byte[] password) - { - return EncryptPassword (password, MembershipPasswordCompatibilityMode.Framework20); - } - [MonoTODO ("Discover what actually is 4.0 password compatibility mode.")] - protected virtual byte[] EncryptPassword (byte[] password, MembershipPasswordCompatibilityMode legacyPasswordCompatibilityMode) - { - if (helper == null) - throw new PlatformNotSupportedException ("This method is not available."); - - if (legacyPasswordCompatibilityMode == MembershipPasswordCompatibilityMode.Framework40) - throw new PlatformNotSupportedException ("Framework 4.0 password encryption mode is not supported at this time."); - - return helper.EncryptPassword (password); - } - } -} - - - diff --git a/mcs/class/System.Web/System.Web.Security/MembershipProviderCollection.cs b/mcs/class/System.Web/System.Web.Security/MembershipProviderCollection.cs deleted file mode 100644 index be25a051cc7..00000000000 --- a/mcs/class/System.Web/System.Web.Security/MembershipProviderCollection.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// System.Web.Security.MembershipProviderCollection -// -// Authors: -// Ben Maurer (bmaurer@users.sourceforge.net) -// Sebastien Pouliot <sebastien@ximian.com> -// -// (C) 2003 Ben Maurer -// Copyright (c) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System.Configuration.Provider; -using System.Runtime.CompilerServices; - -namespace System.Web.Security -{ - [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] - public sealed class MembershipProviderCollection : ProviderCollection - { - public override void Add (ProviderBase provider) - { - if (provider == null) - throw new ArgumentNullException ("provider"); - - if (provider is MembershipProvider) - base.Add (provider); - else { - throw new ArgumentException ("provider", Locale.GetText ( - "Wrong type, expected {0}.", "MembershipProvider")); - } - } - - public void CopyTo (MembershipProvider[] array, int index) - { - base.CopyTo (array, index); - } - - public new MembershipProvider this [string name] { - get { return (MembershipProvider) base [name]; } - } - } -} - - diff --git a/mcs/class/System.Web/System.Web.Security/MembershipUser.cs b/mcs/class/System.Web/System.Web.Security/MembershipUser.cs deleted file mode 100644 index c370f21661b..00000000000 --- a/mcs/class/System.Web/System.Web.Security/MembershipUser.cs +++ /dev/null @@ -1,239 +0,0 @@ -// -// System.Web.Security.MembershipUser -// -// Authors: -// Ben Maurer (bmaurer@users.sourceforge.net) -// -// (C) 2003 Ben Maurer -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -namespace System.Web.Security -{ - [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] - [Serializable] - public class MembershipUser - { - string providerName; - string name; - object providerUserKey; - string email; - string passwordQuestion; - string comment; - bool isApproved; - bool isLockedOut; - DateTime creationDate; - DateTime lastLoginDate; - DateTime lastActivityDate; - DateTime lastPasswordChangedDate; - DateTime lastLockoutDate; - - protected MembershipUser () - { - } - - public MembershipUser (string providerName, string name, object providerUserKey, string email, - string passwordQuestion, string comment, bool isApproved, bool isLockedOut, - DateTime creationDate, DateTime lastLoginDate, DateTime lastActivityDate, - DateTime lastPasswordChangedDate, DateTime lastLockoutDate) - { - this.providerName = providerName; - this.name = name; - this.providerUserKey = providerUserKey; - this.email = email; - this.passwordQuestion = passwordQuestion; - this.comment = comment; - this.isApproved = isApproved; - this.isLockedOut = isLockedOut; - this.creationDate = creationDate.ToUniversalTime (); - this.lastLoginDate = lastLoginDate.ToUniversalTime (); - this.lastActivityDate = lastActivityDate.ToUniversalTime (); - this.lastPasswordChangedDate = lastPasswordChangedDate.ToUniversalTime (); - this.lastLockoutDate = lastLockoutDate.ToUniversalTime (); - } - - void UpdateSelf (MembershipUser fromUser) - { - try { Comment = fromUser.Comment; } catch (NotSupportedException) {} - try { creationDate = fromUser.CreationDate; } catch (NotSupportedException) {} - try { Email = fromUser.Email; } catch (NotSupportedException) {} - try { IsApproved = fromUser.IsApproved; } catch (NotSupportedException) {} - try { isLockedOut = fromUser.IsLockedOut; } catch (NotSupportedException) {} - try { LastActivityDate = fromUser.LastActivityDate; } catch (NotSupportedException) {} - try { lastLockoutDate = fromUser.LastLockoutDate; } catch (NotSupportedException) {} - try { LastLoginDate = fromUser.LastLoginDate; } catch (NotSupportedException) {} - try { lastPasswordChangedDate = fromUser.LastPasswordChangedDate; } catch (NotSupportedException) {} - try { passwordQuestion = fromUser.PasswordQuestion; } catch (NotSupportedException) {} - try { providerUserKey = fromUser.ProviderUserKey; } catch (NotSupportedException) {} - } - - internal void UpdateUser () - { - MembershipUser newUser = Provider.GetUser (UserName, false); - UpdateSelf (newUser); - } - - public virtual bool ChangePassword (string oldPassword, string newPassword) - { - bool success = Provider.ChangePassword (UserName, oldPassword, newPassword); - - UpdateUser (); - - return success; - } - - public virtual bool ChangePasswordQuestionAndAnswer (string password, string newPasswordQuestion, string newPasswordAnswer) - { - bool success = Provider.ChangePasswordQuestionAndAnswer (UserName, password, newPasswordQuestion, newPasswordAnswer); - - UpdateUser (); - - return success; - } - - public virtual string GetPassword () - { - return GetPassword (null); - } - - public virtual string GetPassword (string answer) - { - return Provider.GetPassword (UserName, answer); - } - - public virtual string ResetPassword () - { - return ResetPassword (null); - } - - public virtual string ResetPassword (string answer) - { - string newPass = Provider.ResetPassword (UserName, answer); - - UpdateUser (); - - return newPass; - } - - public virtual string Comment { - get { return comment; } - set { comment = value; } - } - - public virtual DateTime CreationDate { - get { return creationDate.ToLocalTime (); } - } - - public virtual string Email { - get { return email; } - set { email = value; } - } - - public virtual bool IsApproved { - get { return isApproved; } - set { isApproved = value; } - } - - public virtual bool IsLockedOut { - get { return isLockedOut; } - } - - public virtual - bool IsOnline { - get { - int minutes; - IMembershipHelper helper = MembershipProvider.Helper; - if (helper == null) - throw new PlatformNotSupportedException ("The method is not available."); - minutes = helper.UserIsOnlineTimeWindow; - return LastActivityDate > DateTime.Now - TimeSpan.FromMinutes (minutes); - } - } - - public virtual DateTime LastActivityDate { - get { return lastActivityDate.ToLocalTime (); } - set { lastActivityDate = value.ToUniversalTime (); } - } - - public virtual DateTime LastLoginDate { - get { return lastLoginDate.ToLocalTime (); } - set { lastLoginDate = value.ToUniversalTime (); } - } - - public virtual DateTime LastPasswordChangedDate { - get { return lastPasswordChangedDate.ToLocalTime (); } - } - - public virtual DateTime LastLockoutDate { - get { return lastLockoutDate.ToLocalTime (); } - } - - public virtual string PasswordQuestion { - get { return passwordQuestion; } - } - - public virtual string ProviderName { - get { return providerName; } - } - - public virtual string UserName { - get { return name; } - } - - public virtual object ProviderUserKey { - get { return providerUserKey; } - } - - public override string ToString () - { - return UserName; - } - - public virtual bool UnlockUser () - { - bool retval = Provider.UnlockUser (UserName); - - UpdateUser (); - - return retval; - } - - MembershipProvider Provider { - get { - MembershipProvider p; - IMembershipHelper helper = MembershipProvider.Helper; - if (helper == null) - throw new PlatformNotSupportedException ("The method is not available."); - p = helper.Providers [ProviderName]; - if (p == null) - throw new InvalidOperationException ("Membership provider '" + ProviderName + "' not found."); - return p; - } - } - } -} - - diff --git a/mcs/class/System.Web/System.Web.Security/MembershipUserCollection.cs b/mcs/class/System.Web/System.Web.Security/MembershipUserCollection.cs deleted file mode 100644 index bbb689fa3eb..00000000000 --- a/mcs/class/System.Web/System.Web.Security/MembershipUserCollection.cs +++ /dev/null @@ -1,112 +0,0 @@ -// -// System.Web.Security.MembershipUserCollection -// -// Authors: -// Ben Maurer (bmaurer@users.sourceforge.net) -// -// (C) 2003 Ben Maurer -// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Collections; -using System.Runtime.CompilerServices; -using System.Web.UI; - -namespace System.Web.Security -{ - [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] - [Serializable] - public sealed class MembershipUserCollection : ICollection - { - public MembershipUserCollection () - { - } - - public void Add (MembershipUser user) - { - if (user == null) - throw new ArgumentNullException ("user"); - - CheckNotReadOnly (); - store.Add (user.UserName, user); - } - - public void Clear () - { - CheckNotReadOnly (); - store.Clear (); - } - - void ICollection.CopyTo (Array array, int index) - { - store.Values.CopyTo (array, index); - } - - public void CopyTo (MembershipUser[] array, int index) - { - store.Values.CopyTo (array, index); - } - - public IEnumerator GetEnumerator () - { - return ((IEnumerable) store).GetEnumerator (); - } - - public void Remove (string name) - { - CheckNotReadOnly (); - store.Remove (name); - } - - public void SetReadOnly () - { - readOnly = true; - } - - public int Count { - get { return store.Count; } - } - - public bool IsSynchronized { - get { return false; } - } - - public MembershipUser this [string name] { - get { return (MembershipUser) store [name]; } - } - - public object SyncRoot { - get { return this; } - } - - void CheckNotReadOnly () - { - if (readOnly) - throw new NotSupportedException (); - } - - KeyedList store = new KeyedList (); - bool readOnly = false; - } -} - - diff --git a/mcs/class/System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs b/mcs/class/System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs deleted file mode 100644 index 1c475112c66..00000000000 --- a/mcs/class/System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// System.Web.Security.MembershipValidatePasswordEventHandler -// -// Authors: -// Lluis Sanchez Gual (lluis@novell.com) -// -// (C) 2005 Novell, inc. -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Runtime.CompilerServices; - -namespace System.Web.Security -{ - [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] - public delegate void MembershipValidatePasswordEventHandler (object sender, ValidatePasswordEventArgs e); -} - - diff --git a/mcs/class/System.Web/System.Web.Security/RoleProvider.cs b/mcs/class/System.Web/System.Web.Security/RoleProvider.cs deleted file mode 100644 index ad9079c09fe..00000000000 --- a/mcs/class/System.Web/System.Web.Security/RoleProvider.cs +++ /dev/null @@ -1,56 +0,0 @@ -// -// System.Web.Security.IRoleProvider -// -// Authors: -// Ben Maurer (bmaurer@users.sourceforge.net) -// -// (C) 2003 Ben Maurer -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System.Configuration.Provider; -using System.Runtime.CompilerServices; - -namespace System.Web.Security -{ - [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] - public abstract class RoleProvider : ProviderBase - { - protected RoleProvider () - { - } - - public abstract void AddUsersToRoles (string [] usernames, string [] rolenames); - public abstract void CreateRole (string rolename); - public abstract bool DeleteRole (string rolename, bool throwOnPopulatedRole); - public abstract string [] FindUsersInRole (string roleName, string usernameToMatch); - public abstract string [] GetAllRoles (); - public abstract string [] GetRolesForUser (string username); - public abstract string [] GetUsersInRole (string rolename); - public abstract bool IsUserInRole (string username, string rolename); - public abstract void RemoveUsersFromRoles (string [] usernames, string [] rolenames); - public abstract bool RoleExists (string rolename); - public abstract string ApplicationName { get; set; } - } -} - - diff --git a/mcs/class/System.Web/System.Web.Security/ValidatePasswordEventArgs.cs b/mcs/class/System.Web/System.Web.Security/ValidatePasswordEventArgs.cs deleted file mode 100644 index ea189038e8e..00000000000 --- a/mcs/class/System.Web/System.Web.Security/ValidatePasswordEventArgs.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -// System.Web.Security.ValidatePasswordEventArgs -// -// Authors: -// Lluis Sanchez Gual (lluis@novell.com) -// -// (C) 2005 Novell, inc. -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -using System; -using System.Runtime.CompilerServices; - -namespace System.Web.Security -{ - [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] - public sealed class ValidatePasswordEventArgs: EventArgs - { - bool cancel; - Exception exception; - bool isNewUser; - string userName; - string password; - - public ValidatePasswordEventArgs (string userName, string password, bool isNewUser) - { - this.isNewUser = isNewUser; - this.userName = userName; - this.password = password; - } - - public bool Cancel { - get { return cancel; } - set { cancel = value; } - } - - public Exception FailureInformation { - get { return exception; } - set { exception = value; } - } - - public bool IsNewUser { - get { return isNewUser; } - } - - public string UserName { - get { return userName; } - } - - public string Password { - get { return password; } - } - } -} - diff --git a/mcs/class/System.Web/System.Web.UI/KeyedList.cs b/mcs/class/System.Web/System.Web.UI/KeyedList.cs deleted file mode 100644 index 384ba52a162..00000000000 --- a/mcs/class/System.Web/System.Web.UI/KeyedList.cs +++ /dev/null @@ -1,181 +0,0 @@ -// -// System.Web.UI/KeyedList.cs -// -// Author: Todd Berman <tberman@gentoo.org> -// -// (C) 2003 Todd Berman - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Collections; -using System.Collections.Specialized; - -namespace System.Web.UI -{ - class KeyedList : IOrderedDictionary - { - - Hashtable objectTable = new Hashtable (); - ArrayList objectList = new ArrayList (); - - public void Add (object key, object value) - { - objectTable.Add (key, value); - objectList.Add (new DictionaryEntry (key, value)); - } - - public void Clear () - { - objectTable.Clear (); - objectList.Clear (); - } - - public bool Contains (object key) - { - return objectTable.Contains (key); - } - - public void CopyTo (Array array, int idx) - { - objectTable.CopyTo (array, idx); - } - - public void Insert (int idx, object key, object value) - { - if (idx > Count) - throw new ArgumentOutOfRangeException ("index"); - - objectTable.Add (key, value); - objectList.Insert (idx, new DictionaryEntry (key, value)); - } - - public void Remove (object key) - { - objectTable.Remove (key); - int index = IndexOf (key); - if (index >= 0) - objectList.RemoveAt (index); - } - - public void RemoveAt (int idx) - { - if (idx >= Count) - throw new ArgumentOutOfRangeException ("index"); - - objectTable.Remove ( ((DictionaryEntry)objectList[idx]).Key ); - objectList.RemoveAt (idx); - } - - IDictionaryEnumerator IDictionary.GetEnumerator () - { - return new KeyedListEnumerator (objectList); - } - - IDictionaryEnumerator IOrderedDictionary.GetEnumerator () - { - return new KeyedListEnumerator (objectList); - } - - IEnumerator IEnumerable.GetEnumerator () - { - return new KeyedListEnumerator (objectList); - } - public int Count { - get { return objectList.Count; } - } - - public bool IsFixedSize { - get { return false; } - } - - public bool IsReadOnly { - get { return false; } - } - - public bool IsSynchronized { - get { return false; } - } - - public object this[int idx] { - get { return ((DictionaryEntry) objectList[idx]).Value; } - set { - if (idx < 0 || idx >= Count) - throw new ArgumentOutOfRangeException ("index"); - - object key = ((DictionaryEntry) objectList[idx]).Key; - objectList[idx] = new DictionaryEntry (key, value); - objectTable[key] = value; - } - } - - public object this[object key] { - get { return objectTable[key]; } - set { - if (objectTable.Contains (key)) - { - objectTable[key] = value; - objectTable[IndexOf (key)] = new DictionaryEntry (key, value); - return; - } - Add (key, value); - } - } - - public ICollection Keys { - get { - ArrayList retList = new ArrayList (); - for (int i = 0; i < objectList.Count; i++) - { - retList.Add ( ((DictionaryEntry)objectList[i]).Key ); - } - return retList; - } - } - - public ICollection Values { - get { - ArrayList retList = new ArrayList (); - for (int i = 0; i < objectList.Count; i++) - { - retList.Add ( ((DictionaryEntry)objectList[i]).Value ); - } - return retList; - } - } - - public object SyncRoot { - get { return this; } - } - - int IndexOf (object key) - { - for (int i = 0; i < objectList.Count; i++) - { - if (((DictionaryEntry) objectList[i]).Key.Equals (key)) - { - return i; - } - } - return -1; - } - } -} diff --git a/mcs/class/System.Web/System.Web.UI/KeyedListEnumerator.cs b/mcs/class/System.Web/System.Web.UI/KeyedListEnumerator.cs deleted file mode 100644 index db916a2766a..00000000000 --- a/mcs/class/System.Web/System.Web.UI/KeyedListEnumerator.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// System.Web.UI/KeyedListEnumerator.cs -// -// Author: Todd Berman <tberman@gentoo.org> -// -// (C) 2003 Todd Berman - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System.Collections; - -namespace System.Web.UI -{ - internal class KeyedListEnumerator : IDictionaryEnumerator - { - int index = -1; - ArrayList objs; - - internal KeyedListEnumerator (ArrayList list) - { - objs = list; - } - - public bool MoveNext () - { - index++; - if (index >= objs.Count) - return false; - - return true; - } - - public void Reset () - { - index = -1; - } - - public object Current { - get { - if (index < 0 || index >= objs.Count) - throw new InvalidOperationException (); - - return ((DictionaryEntry)objs[index]).Value; - } - } - - public DictionaryEntry Entry { - get { - return (DictionaryEntry) Current; - } - } - - public object Key { - get { - return Entry.Key; - } - } - - public object Value { - get { - return Entry.Value; - } - } - } -} |