+++ /dev/null
--//
--// System.Web.Security.ADMembershipProvider
--//
--// 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.
--//
--
--#if NET_2_0
--using System.Collections;
--using System.Collections.Specialized;
--using System.Text;
--
--namespace System.Web.Security {
-- public class ADMembershipProvider : IMembershipProvider {
--
-- [MonoTODO]
-- public virtual bool ChangePassword (string username, string oldPwd, string newPwd)
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public virtual bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public virtual MembershipUser CreateUser (string username, string password, string email, out MembershipCreateStatus status)
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public virtual bool DeleteUser (string username)
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public virtual string GeneratePassword ()
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public MembershipUserCollection GetAllUsers ()
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public int GetNumberOfUsersOnline ()
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public virtual string GetPassword (string username, string answer)
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public virtual MembershipUser GetUser (string username, bool userIsOnline)
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public virtual string GetUserNameByEmail (string email)
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public virtual void Initialize (string name, NameValueCollection config)
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public virtual string ResetPassword (string username, string answer)
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public virtual void UpdateUser (MembershipUser user)
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public virtual bool ValidateUser (string username, string password)
-- {
-- throw new NotImplementedException ();
-- }
--
-- [MonoTODO]
-- public string ApplicationName {
-- get { throw new NotImplementedException (); }
-- set { throw new NotImplementedException (); }
-- }
--
-- [MonoTODO]
-- public virtual string Description {
-- get { throw new NotImplementedException (); }
-- }
--
-- [MonoTODO]
-- public virtual bool EnablePasswordReset {
-- get { throw new NotImplementedException (); }
-- }
--
-- [MonoTODO]
-- public virtual bool EnablePasswordRetrieval {
-- get { throw new NotImplementedException (); }
-- }
--
-- [MonoTODO]
-- public virtual string Name {
-- get { throw new NotImplementedException (); }
-- }
--
-- [MonoTODO]
-- public virtual MembershipPasswordFormat PasswordFormat {
-- get { throw new NotImplementedException (); }
-- }
--
-- [MonoTODO]
-- public virtual bool RequiresQuestionAndAnswer {
-- get { throw new NotImplementedException (); }
-- }
--
-- [MonoTODO]
-- public virtual bool RequiresUniqueEmail {
-- get { throw new NotImplementedException (); }
-- }
-- }
--}
--#endif
--
//
// Authors:
// Ben Maurer (bmaurer@users.sourceforge.net)
++// Lluis Sanchez Gual (lluis@novell.com)
//
// (C) 2003 Ben Maurer
//
using System.Text;
namespace System.Web.Security {
-- public class AccessMembershipProvider : IMembershipProvider {
++ public class AccessMembershipProvider : MembershipProvider {
[MonoTODO]
-- public virtual bool ChangePassword (string username, string oldPwd, string newPwd)
++ public override bool ChangePassword (string username, string oldPwd, string newPwd)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
++ public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual MembershipUser CreateUser (string username, string password, string email, out MembershipCreateStatus status)
++ public override MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual bool DeleteUser (string username)
++ public override bool DeleteUser (string username, bool deleteAllRelatedData)
{
throw new NotImplementedException ();
}
}
[MonoTODO]
-- public MembershipUserCollection GetAllUsers ()
++ public override MembershipUserCollection FindUsersByEmail (string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public int GetNumberOfUsersOnline ()
++ public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual string GetPassword (string username, string answer)
++ public override MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual MembershipUser GetUser (string username, bool userIsOnline)
++ public override int GetNumberOfUsersOnline ()
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual string GetUserNameByEmail (string email)
++ public override string GetPassword (string username, string answer)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual void Initialize (string name, NameValueCollection config)
++ public override MembershipUser GetUser (string username, bool userIsOnline)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual string ResetPassword (string username, string answer)
++ public override string GetUserNameByEmail (string email)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual void UpdateUser (MembershipUser user)
++ public override void Initialize (string name, NameValueCollection config)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual bool ValidateUser (string username, string password)
++ public override string ResetPassword (string username, string answer)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public string ApplicationName {
-- get { throw new NotImplementedException (); }
-- set { throw new NotImplementedException (); }
++ public override void UpdateUser (MembershipUser user)
++ {
++ throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual string Description {
++ public override bool ValidateUser (string username, string password)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override string ApplicationName {
get { throw new NotImplementedException (); }
++ set { throw new NotImplementedException (); }
}
[MonoTODO]
-- public virtual bool EnablePasswordReset {
++ public virtual string Description {
get { throw new NotImplementedException (); }
}
[MonoTODO]
-- public virtual bool EnablePasswordRetrieval {
++ public override bool EnablePasswordReset {
get { throw new NotImplementedException (); }
}
[MonoTODO]
-- public virtual string Name {
++ public override bool EnablePasswordRetrieval {
get { throw new NotImplementedException (); }
}
}
[MonoTODO]
-- public virtual bool RequiresQuestionAndAnswer {
++ public override bool RequiresQuestionAndAnswer {
get { throw new NotImplementedException (); }
}
using System.Text;
namespace System.Web.Security {
-- public class AccessRoleProvider {
++ public class AccessRoleProvider: RoleProvider {
[MonoTODO]
-- public void AddUsersToRoles (string [] usernames, string [] rolenames)
++ public override void AddUsersToRoles (string [] usernames, string [] rolenames)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public void CreateRole (string rolename)
++ public override void CreateRole (string rolename)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public void DeleteRole (string rolename)
++ public override void DeleteRole (string rolename, bool throwOnPopulatedRole)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public string [] GetAllRoles ()
++ public override void FindUsersInRole (string roleName, string usernameToMatch)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public string [] GetRolesForUser (string username)
++ public override string [] GetAllRoles ()
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public string [] GetUsersInRole (string rolename)
++ public override string [] GetRolesForUser (string username)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual void Initialize (string name, NameValueCollection config)
++ public override string [] GetUsersInRole (string rolename)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public bool IsUserInRole (string username, string rolename)
++ public override void Initialize (string name, NameValueCollection config)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
++ public override bool IsUserInRole (string username, string rolename)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public bool RoleExists (string rolename)
++ public override void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public string ApplicationName {
-- get { throw new NotImplementedException (); }
-- set { throw new NotImplementedException (); }
++ public override bool RoleExists (string rolename)
++ {
++ throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual string Description {
++ public override string ApplicationName {
get { throw new NotImplementedException (); }
++ set { throw new NotImplementedException (); }
}
[MonoTODO]
-- public virtual string Name {
++ public virtual string Description {
get { throw new NotImplementedException (); }
}
}
--- /dev/null
--- /dev/null
++//
++// System.Web.Security.ActiveDirectoryMembershipProvider
++//
++// Authors:
++// Ben Maurer (bmaurer@users.sourceforge.net)
++// Lluis Sanchez Gual (lluis@novell.com)
++//
++// (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.
++//
++
++#if NET_2_0
++using System.Collections;
++using System.Collections.Specialized;
++using System.Text;
++
++namespace System.Web.Security {
++ public class ActiveDirectoryMembershipProvider : MembershipProvider {
++
++ [MonoTODO]
++ public override bool ChangePassword (string username, string oldPwd, string newPwd)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override bool DeleteUser (string username, bool deleteAllRelatedData)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public virtual string GeneratePassword ()
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override MembershipUserCollection FindUsersByEmail (string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override int GetNumberOfUsersOnline ()
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override string GetPassword (string username, string answer)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override MembershipUser GetUser (string username, bool userIsOnline)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override string GetUserNameByEmail (string email)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override void Initialize (string name, NameValueCollection config)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override string ResetPassword (string username, string answer)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override void UpdateUser (MembershipUser user)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override bool ValidateUser (string username, string password)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override string ApplicationName {
++ get { throw new NotImplementedException (); }
++ set { throw new NotImplementedException (); }
++ }
++
++ [MonoTODO]
++ public virtual string Description {
++ get { throw new NotImplementedException (); }
++ }
++
++ [MonoTODO]
++ public override bool EnablePasswordReset {
++ get { throw new NotImplementedException (); }
++ }
++
++ [MonoTODO]
++ public override bool EnablePasswordRetrieval {
++ get { throw new NotImplementedException (); }
++ }
++
++ [MonoTODO]
++ public virtual MembershipPasswordFormat PasswordFormat {
++ get { throw new NotImplementedException (); }
++ }
++
++ [MonoTODO]
++ public override bool RequiresQuestionAndAnswer {
++ get { throw new NotImplementedException (); }
++ }
++
++ [MonoTODO]
++ public virtual bool RequiresUniqueEmail {
++ get { throw new NotImplementedException (); }
++ }
++ }
++}
++#endif
++
++2004-11-18 Lluis Sanchez Gual <lluis@novell.com>
++
++ * 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.
++
+2004-11-15 Lluis Sanchez Gual <lluis@novell.com>
+
+ * RoleProviderCollection.cs, MembershipProviderCollection.cs:
+ Fixed warnings.
2004-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+++ /dev/null
--//
--// System.Web.Security.IMembershipProvider
--//
--// 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.
--//
--
--#if NET_2_0
--using System.Configuration.Provider;
--
--namespace System.Web.Security {
-- public interface IMembershipProvider : IProvider {
-- bool ChangePassword (string name, string oldPwd, string newPwd);
-- bool ChangePasswordQuestionAndAnswer (string name, string password, string newPwdQuestion, string newPwdAnswer);
-- MembershipUser CreateUser (string username, string password, string email, out MembershipCreateStatus status);
-- bool DeleteUser (string name);
-- MembershipUserCollection GetAllUsers ();
-- int GetNumberOfUsersOnline ();
-- string GetPassword (string name, string answer);
-- MembershipUser GetUser (string name, bool userIsOnline);
-- string GetUserNameByEmail (string email);
-- string ResetPassword (string name, string answer);
-- void UpdateUser (MembershipUser user);
-- bool ValidateUser (string name, string password);
-- string ApplicationName { get; set; }
-- bool EnablePasswordReset { get; }
-- bool EnablePasswordRetrieval { get; }
-- bool RequiresQuestionAndAnswer { get; }
-- }
--}
--#endif
--
+++ /dev/null
--//
--// 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.
--//
--
--#if NET_2_0
--using System.Configuration.Provider;
--
--namespace System.Web.Security {
-- public interface IRoleProvider : IProvider {
-- void AddUsersToRoles (string [] usernames, string [] rolenames);
-- void CreateRole (string rolename);
-- void DeleteRole (string rolename);
-- string [] GetAllRoles ();
-- string [] GetRolesForUser (string username);
-- string [] GetUsersInRole (string rolename);
-- bool IsUserInRole (string username, string rolename);
-- void RemoveUsersFromRoles (string [] usernames, string [] rolenames);
-- bool RoleExists (string rolename);
-- string ApplicationName { get; set; }
-- }
--}
--#endif
--
namespace System.Web.Security {
public sealed class Membership {
++ private Membership () {}
++
public static MembershipUser CreateUser (string username, string password)
{
return CreateUser (username, password, null);
public static MembershipUser CreateUser (string username, string password, string email)
{
MembershipCreateStatus status;
-- MembershipUser usr = CreateUser (username, password, email, out status);
++ MembershipUser usr = CreateUser (username, password, email, null, null, true, out status);
if (usr == null)
throw new MembershipCreateUserException (status);
return usr;
}
-- public static MembershipUser CreateUser (string username, string password, string email, out MembershipCreateStatus status)
++ public static MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status)
{
-- return Provider.CreateUser (username, password, email, out status);
++ return Provider.CreateUser (username, password, email, pwdQuestion, pwdAnswer, isApproved, out status);
}
public static bool DeleteUser (string username)
{
-- return Provider.DeleteUser (username);
++ return Provider.DeleteUser (username, true);
++ }
++
++ public static bool DeleteUser (string username, bool deleteAllRelatedData)
++ {
++ return Provider.DeleteUser (username, deleteAllRelatedData);
}
[MonoTODO]
public static MembershipUserCollection GetAllUsers ()
{
-- return Provider.GetAllUsers ();
++ int total;
++ return GetAllUsers (1, int.MaxValue, out total);
++ }
++
++ public static MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords)
++ {
++ return Provider.GetAllUsers (pageIndex, pageSize, out totalRecords);
}
public static int GetNumberOfUsersOnline ()
}
[MonoTODO]
-- public static IMembershipProvider Provider {
++ public static MembershipProvider Provider {
get { throw new NotImplementedException (); }
}
--- /dev/null
--- /dev/null
++//
++// System.Web.Security.IMembershipProvider
++//
++// Authors:
++// Ben Maurer (bmaurer@users.sourceforge.net)
++// Lluis Sanchez Gual (lluis@novell.com)
++//
++// (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.
++//
++
++#if NET_2_0
++using System.Configuration.Provider;
++
++namespace System.Web.Security
++{
++ public abstract class MembershipProvider : ProviderBase
++ {
++ 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, 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 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 string ApplicationName { get; set; }
++ public abstract bool EnablePasswordReset { get; }
++ public abstract bool EnablePasswordRetrieval { get; }
++ public abstract bool RequiresQuestionAndAnswer { get; }
++ }
++}
++#endif
++
namespace System.Web.Security {
public class MembershipProviderCollection : ProviderCollection {
-- public override void Add (IProvider provider)
++ public override void Add (ProviderBase provider)
{
-- if (provider is IMembershipProvider)
++ if (provider is MembershipProvider)
base.Add (provider);
else
throw new HttpException ();
}
- public new IMembershipProvider this [string name] {
- public IMembershipProvider this [string name] {
-- get { return (IMembershipProvider) base [name]; }
++ public new MembershipProvider this [string name] {
++ get { return (MembershipProvider) base [name]; }
}
}
}
{
}
-- public MembershipUser (IMembershipProvider provider, string name, string email,
++ public MembershipUser (MembershipProvider provider, string name, string email,
string passwordQuestion, string comment, bool isApproved,
DateTime creationDate, DateTime lastLoginDate, DateTime lastActivityDate,
DateTime lastPasswordChangedDate)
get { return passwordQuestion; }
}
-- public virtual IMembershipProvider Provider {
++ public virtual MembershipProvider Provider {
get { return provider; }
}
get { return name; }
}
-- IMembershipProvider provider;
++ MembershipProvider provider;
string name;
string email;
string passwordQuestion;
--- /dev/null
--- /dev/null
++//
++// 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.
++//
++
++#if NET_2_0
++using System.Configuration.Provider;
++
++namespace System.Web.Security
++{
++ public abstract class RoleProvider : ProviderBase
++ {
++ protected RoleProvider ()
++ {
++ }
++
++ public abstract void AddUsersToRoles (string [] usernames, string [] rolenames);
++ public abstract void CreateRole (string rolename);
++ public abstract void DeleteRole (string rolename, bool throwOnPopulatedRole);
++ public abstract void 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; }
++ }
++}
++#endif
++
namespace System.Web.Security {
public class RoleProviderCollection : ProviderCollection {
-- public override void Add (IProvider provider)
++ public override void Add (ProviderBase provider)
{
-- if (provider is IRoleProvider)
++ if (provider is RoleProvider)
base.Add (provider);
else
throw new HttpException ();
}
- public new IRoleProvider this [string name] {
- public IRoleProvider this [string name] {
-- get { return (IRoleProvider) base [name]; }
++ public new RoleProvider this [string name] {
++ get { return (RoleProvider) base [name]; }
}
}
}
}
[MonoTODO]
-- public static IRoleProvider Provider {
++ public static RoleProvider Provider {
get { throw new NotImplementedException (); }
}
//
// Authors:
// Ben Maurer (bmaurer@users.sourceforge.net)
++// Lluis Sanchez Gual (lluis@novell.com)
//
// (C) 2003 Ben Maurer
//
using System.Text;
namespace System.Web.Security {
-- public class SqlMembershipProvider : IMembershipProvider {
++ public class SqlMembershipProvider : MembershipProvider {
[MonoTODO]
-- public virtual bool ChangePassword (string username, string oldPwd, string newPwd)
++ public override bool ChangePassword (string username, string oldPwd, string newPwd)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
++ public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual MembershipUser CreateUser (string username, string password, string email, out MembershipCreateStatus status)
++ public override MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual bool DeleteUser (string username)
++ public override bool DeleteUser (string username, bool deleteAllRelatedData)
{
throw new NotImplementedException ();
}
}
[MonoTODO]
-- public MembershipUserCollection GetAllUsers ()
++ public override MembershipUserCollection FindUsersByEmail (string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public int GetNumberOfUsersOnline ()
++ public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual string GetPassword (string username, string answer)
++ public override MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual MembershipUser GetUser (string username, bool userIsOnline)
++ public override int GetNumberOfUsersOnline ()
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual string GetUserNameByEmail (string email)
++ public override string GetPassword (string username, string answer)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual void Initialize (string name, NameValueCollection config)
++ public override MembershipUser GetUser (string username, bool userIsOnline)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual string ResetPassword (string username, string answer)
++ public override string GetUserNameByEmail (string email)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual void UpdateUser (MembershipUser user)
++ public override void Initialize (string name, NameValueCollection config)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual bool ValidateUser (string username, string password)
++ public override string ResetPassword (string username, string answer)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public string ApplicationName {
-- get { throw new NotImplementedException (); }
-- set { throw new NotImplementedException (); }
++ public override void UpdateUser (MembershipUser user)
++ {
++ throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual string Description {
++ public override bool ValidateUser (string username, string password)
++ {
++ throw new NotImplementedException ();
++ }
++
++ [MonoTODO]
++ public override string ApplicationName {
get { throw new NotImplementedException (); }
++ set { throw new NotImplementedException (); }
}
[MonoTODO]
-- public virtual bool EnablePasswordReset {
++ public virtual string Description {
get { throw new NotImplementedException (); }
}
[MonoTODO]
-- public virtual bool EnablePasswordRetrieval {
++ public override bool EnablePasswordReset {
get { throw new NotImplementedException (); }
}
[MonoTODO]
-- public virtual string Name {
++ public override bool EnablePasswordRetrieval {
get { throw new NotImplementedException (); }
}
}
[MonoTODO]
-- public virtual bool RequiresQuestionAndAnswer {
++ public override bool RequiresQuestionAndAnswer {
get { throw new NotImplementedException (); }
}
using System.Text;
namespace System.Web.Security {
-- public class SqlRoleProvider {
++ public class SqlRoleProvider: RoleProvider {
[MonoTODO]
-- public void AddUsersToRoles (string [] usernames, string [] rolenames)
++ public override void AddUsersToRoles (string [] usernames, string [] rolenames)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public void CreateRole (string rolename)
++ public override void CreateRole (string rolename)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public void DeleteRole (string rolename)
++ public override void DeleteRole (string rolename, bool throwOnPopulatedRole)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public string [] GetAllRoles ()
++ public override void FindUsersInRole (string roleName, string usernameToMatch)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public string [] GetRolesForUser (string username)
++ public override string [] GetAllRoles ()
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public string [] GetUsersInRole (string rolename)
++ public override string [] GetRolesForUser (string username)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual void Initialize (string name, NameValueCollection config)
++ public override string [] GetUsersInRole (string rolename)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public bool IsUserInRole (string username, string rolename)
++ public override void Initialize (string name, NameValueCollection config)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
++ public override bool IsUserInRole (string username, string rolename)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public bool RoleExists (string rolename)
++ public override void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public string ApplicationName {
-- get { throw new NotImplementedException (); }
-- set { throw new NotImplementedException (); }
++ public override bool RoleExists (string rolename)
++ {
++ throw new NotImplementedException ();
}
[MonoTODO]
-- public virtual string Description {
++ public override string ApplicationName {
get { throw new NotImplementedException (); }
++ set { throw new NotImplementedException (); }
}
[MonoTODO]
-- public virtual string Name {
++ public virtual string Description {
get { throw new NotImplementedException (); }
}
}