diff options
Diffstat (limited to 'framework/Web/Security')
27 files changed, 0 insertions, 1896 deletions
diff --git a/framework/Web/Security/Principal/IIdentity.php b/framework/Web/Security/Principal/IIdentity.php deleted file mode 100644 index 89bc0f70..00000000 --- a/framework/Web/Security/Principal/IIdentity.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -/** - * IIdentity interface. - * Defines the basic functionality of a principal object. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: IIdentity.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security.Principal - * @since 3.1 - */ -interface IIdentity -{ - private $_authenticationType; - private $_isAuthenticated; - private $_name; - - public function getAuthenticationType(); - public function setAuthenticationType($value); - public function getIsAuthenticated(); - public function setIsAuthenticated($value); - public function getName(); - public function setName($value); -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/Principal/IPrincipal.php b/framework/Web/Security/Principal/IPrincipal.php deleted file mode 100644 index 9503387a..00000000 --- a/framework/Web/Security/Principal/IPrincipal.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -/** - * IPrincipal interface. - * Defines the basic functionality of an identity object. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: IIdentity.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security.Principal - * @since 3.1 - */ -interface IPrincipal -{ - private $_identity; - - public function getIdentity(); - public function setIdentity($value); - public function isInRole($role); -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/Principal/TGenericIdentity.php b/framework/Web/Security/Principal/TGenericIdentity.php deleted file mode 100644 index 037ebc42..00000000 --- a/framework/Web/Security/Principal/TGenericIdentity.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -/** - * TGenericIdentity class. - * Represents a generic user. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TGenericIdentity.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security.Principal - * @since 3.1 - */ -Prado::using('System.Web.Security.Principal.IIdentity'); -class TGenericIdentity implements IIdentity -{ - private $_authenticationType; - private $_isAuthenticated; - private $_name; - - public function getAuthenticationType() - { - return $this->_authenticationType; - } - public function setAuthenticationType($value) - { - $this->_authenticationType = TPropertyValue::ensureString($value); - } - public function getIsAuthenticated() - { - return $this->_isAuthenticated; - } - public function setIsAuthenticated($value) - { - $this->_isAuthenticated = TPropertyValue::ensureBoolean($value); - } - public function getName() - { - return $this->_name; - } - public function setName($value) - { - $this->_name = TPropertyValue::ensureString($value); - } - - public function __construct($name, $type=null) - { - - } -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/Principal/TGenericPrincipal.php b/framework/Web/Security/Principal/TGenericPrincipal.php deleted file mode 100644 index 8e07388e..00000000 --- a/framework/Web/Security/Principal/TGenericPrincipal.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -/** - * TGenericPrincipal class. - * Represents a generic principal. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TGenericPrincipal.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security.Principal - * @since 3.1 - */ -Prado::using('System.Web.Security.Principal.IPrincipal'); -class TGenericPrincipal implements IPrincipal -{ - private $_identity; - - public function getIdentity() - { - return $this->_identity; - } - public function setIdentity($value) - { - $this->_identity = TPropertyValue::ensureString($value); - } - - public function __construct($name, $type=null) - { - - } - public function isInRole($role) - { - - } -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TAnonymousIdentificationModule.php b/framework/Web/Security/TAnonymousIdentificationModule.php deleted file mode 100644 index 1735edf1..00000000 --- a/framework/Web/Security/TAnonymousIdentificationModule.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -Prado::using('System.Web.IHttpModule'); -final class TAnonymousIdentificationModule implements IHttpModule -{ - -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TAuthorizationStoreRoleProvider.php b/framework/Web/Security/TAuthorizationStoreRoleProvider.php deleted file mode 100644 index d6919ae6..00000000 --- a/framework/Web/Security/TAuthorizationStoreRoleProvider.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php -/** - * TAuthorizationStoreRoleProvider class. - * Manages storage of role-membership information for an PRADO application in an authorization-manager policy store, in an XML file. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TAuthorizationStoreRoleProvider.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -Prado::using('System.Web.Security.TRoleProvider'); -class TAuthorizationStoreRoleProvider extends TRoleProvider -{ - private $_ApplicationName; - public function __construct() - { - - } - public function getApplicationName() - { - return $this->_ApplicationName; - } - public function setApplicationName($value) - { - $this->_ApplicationName = TPropertyValue::ensureString($value); - } - public function AddUsersToRoles($usernames,$roleNames) - { - - } - public function CreateRole($roleName) - { - - } - public function DeleteRole($roleName) - { - - } - public function FineUsersInRole($roleName,$usernameToMatch) - { - - } - public function GetAllRoles() - { - - } - public function GetRolesForUser($username) - { - - } - public function GetUsersIsRole($username,$roleName) - { - - } - public function IsUserIsRole($username,$roleName) - { - - } - public function RemoveUsersFromRoles($usernames,$roleNames) - { - - } - public function RoleExists($roleName) - { - - } -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TCookieProtection.php b/framework/Web/Security/TCookieProtection.php deleted file mode 100644 index 2a757898..00000000 --- a/framework/Web/Security/TCookieProtection.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** - * TCookieProtection class. - * Describes how information in a cookie is protected. - * - * All Use both Validation and Encryption to protect the information - * in the cookie. - * Encryption Encrypt the information in the cookie. - * None Do not protect information in the cookie. Information in the - * cookie is stored in clear text and not validated when sent back - * to the server. - * Validation Ensure that the information in the cookie has not been altered - * before being sent back to the server. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TCookieProtection.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -class TCookieProtection extends TEnumerable -{ - const All='All'; - const Encryption='Encryption'; - const None='None'; - const Validation='Validation'; -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TDefaultAuthenticationModule.php b/framework/Web/Security/TDefaultAuthenticationModule.php deleted file mode 100644 index 03d6e758..00000000 --- a/framework/Web/Security/TDefaultAuthenticationModule.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php -/** - * TDefaultAuthenticationModule class. - * Ensures that an authentication object is present in the context. This class cannot be inherited. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TDefaultAuthenticationModule.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -final class TDefaultAuthenticationModule extends TModule -{ - -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TFormsAuthentication.php b/framework/Web/Security/TFormsAuthentication.php deleted file mode 100644 index 970303a7..00000000 --- a/framework/Web/Security/TFormsAuthentication.php +++ /dev/null @@ -1,176 +0,0 @@ -<?php -/** - * TFormsAuthentication class. - * Manages forms-authentication services for Web applications. This class cannot be inherited. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TFormsAuthentication.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -final class TFormsAuthentication -{ - private static $_cookieDomain; - private static $_cookieMode; - private static $_cookiesSupported; - private static $_defaultUrl; - private static $_enableCrossAppRedirects; - private static $_formsCookieName; - private static $_formsCookiePath; - private static $_loginUrl; - private static $_requireSSL; - private static $_slidingExpiration; - - public static function getCookiePath() - { - return self::$_cookieDomain; - } - public static function setCookiePath($value) - { - self::$_cookieDomain = TPropertyValue::ensureString($value); - } - - public function __construct() - { - - } - - public static function Authenticate($name, $password) - { - - } - public static function Decrypt($encryptedTicket) - { - - } - public static function Encrypt($ticket, $hexEncodedTicket=null) - { - - } - public static function GetAuthCookie( $userName, $createPersistentCookie, $strCookiePath=null, $hexEncodedTicket=null) - { - - } - public static function GetLoginPage($extraQuery,$reuseReturnUrl=null) - { - - } - public static function GetRedirectUrl( $userName, $createPersistentCookie) - { - - } - public static function GetReturnUrl($useDefaultIfAbsent) - { - - } - public static function HashPasswordForStoringInConfigFile($password, $passwordFormat) - { - - } - public static function Initialize() - { - - } - private static function ernalAuthenticate( $name, $password) - { - - } - private static function IsPathWithinAppRoot($context, $path) - { - - } - private static function MakeTicketoBinaryBlob($ticket) - { - - } - public static function RedirectFromLoginPage($userName, $createPersistentCookie, $strCookiePath=null) - { - - } - public static function RedirectToLoginPage($extraQuery=null) - { - - } - private static function RemoveQSVar($ref, $strUrl, $posQ, $token, $sep, $lenAtStartToLeave) - { - - } - public static function RemoveQueryVariableFromUrl( $strUrl, $QSVar) - { - - } - public static function RenewTicketIfOld($tOld) - { - - } - public static function SetAuthCookie( $userName, $createPersistentCookie, $strCookiePath=null) - { - - } - public static function SignOut() - { - - } - - // Properties - public static function getCookieDomain() - { - return self::$_cookieDomain; - } - public static function getCookieMode() - { - return self::$_cookieMode; - } - public static function getCookiesSupported() - { - return self::$_cookiesSupported; - } - public static function getDefaultUrl() - { - return self::$_defaultUrl; - } - public static function getEnableCrossAppRedirects() - { - return self::$_enableCrossAppRedirects; - } - public static function getFormsCookieName() - { - return self::$_formsCookieName; - } - public static function getFormsCookiePath() - { - return self::$_formsCookiePath; - } - public static function getLoginUrl() - { - return self::$_loginUrl; - } - public static function getRequireSSL() - { - return self::$_requireSSL; - } - public static function getSlidingExpiration() - { - return self::$_slidingExpiration; - } - - // Fields - // private static $_CookieDomain; - // private static $_CookieMode; - // private static $_DefaultUrl; - // private static $_EnableCrossAppRedirects; - // private static $_FormsCookiePath; - // private static $_FormsName; - // private static $_Initialized; - // private static $_lockObject; - // private static $_LoginUrl; - // private static $_Protection; - // private static $_RequireSSL; - // private static $_SlidingExpiration; - // private static $_Timeout; - // private const CONFIG_DEFAULT_COOKIE = ".ASPXAUTH"; - // private const MAC_LENGTH = 20; - // private const MAX_TICKET_LENGTH = 0x1000; - // ernal const RETURN_URL = "ReturnUrl"; -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TFormsAuthenticationModule.php b/framework/Web/Security/TFormsAuthenticationModule.php deleted file mode 100644 index df0d5300..00000000 --- a/framework/Web/Security/TFormsAuthenticationModule.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php -/** - * TFormsAuthenticationModule class. - * Sets the identity of the user for an PRADO application when forms authentication is enabled. - * This class cannot be inherited. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TFormsAuthenticationModule.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -final class TFormsAuthenticationModule extends TModule -{ - /** - * @var boolean if the module has been initialized - */ - private $_initialized=false; - - private static $_fAuthChecked=false; - private static $_fAuthRequired=false; - private $_fFormsInit; - private $_formsName; - private $_loginUrl; - const CONFIG_DEFAULT_COOKIE = ".ASPXAUTH"; - const CONFIG_DEFAULT_LOGINURL = "login.aspx"; - - //Is this the best way to do it?? i dont see how the forms module knows about the provider - private $_defaultProvider; - - public function getDefaultProvider() - { - return $this->_defaultProvider; - } - public function setDefaultProvider($value) - { - $this->_defaultProvider = TPropertyValue::ensureString($value); - } - - public function __construct() - { - - } - /** - * Initializes this module. - * This method is required by the IModule interface. - * @param TXmlElement configuration for this module, can be null - * @throws TConfigurationException if user manager does not exist or is not IUserManager - */ - public function init($config) - { - $this->getApplication()->attachEventHandler('OnAuthentication',array($this,'doAuthentication')); - $this->getApplication()->attachEventHandler('OnEndRequest',array($this,'leave')); - $this->getApplication()->attachEventHandler('OnAuthorization',array($this,'doAuthorization')); - $this->_initialized=true; - } - - private static function extractTicketFromCookie($context, $name) - { - - } - /** - * Performs authentication. - * This is the event handler attached to application's Authentication event. - * Do not call this method directly. - * @param mixed sender of the Authentication event - * @param mixed event parameter - */ - public function doAuthentication($sender,$param) - { - Prado::using('System.Util.TVarDumper'); -// echo TVarDumper::dump(__METHOD__,10,true); - } - /** - * Performs login redirect if authorization fails. - * This is the event handler attached to application's EndRequest event. - * Do not call this method directly. - * @param mixed sender of the event - * @param mixed event parameter - */ - public function leave($sender,$param) - { - Prado::using('System.Util.TVarDumper'); -// echo TVarDumper::dump(__METHOD__,10,true); - } - /** - * Performs authorization. - * This is the event handler attached to application's Authorization event. - * Do not call this method directly. - * @param mixed sender of the Authorization event - * @param mixed event parameter - */ - public function doAuthorization($sender,$param) - { - Prado::using('System.Util.TVarDumper'); -// echo TVarDumper::dump(__METHOD__,10,true); - } -} -//public sealed class FormsAuthenticationModule : IHttpModule -//{ -// // Events -// public event FormsAuthenticationEventHandler Authenticate; -// -// // Methods -// [SecurityPermission(SecurityAction.Demand, Unrestricted=true)] -// public FormsAuthenticationModule(); -// public void Dispose(); -// private static FormsAuthenticationTicket -//ExtractTicketFromCookie(HttpContext context, string name, out bool -//cookielessTicket); -// public void Init(HttpApplication app); -// private void OnAuthenticate(FormsAuthenticationEventArgs e); -// private void OnEnter(object source, EventArgs eventArgs); -// private void OnLeave(object source, EventArgs eventArgs); -// private static void Trace(string str); -// -// // Fields -// private FormsAuthenticationEventHandler _eventHandler; -// private static bool _fAuthChecked; -// private static bool _fAuthRequired; -// private bool _fFormsInit; -// private string _FormsName; -// private string _LoginUrl; -// private const string CONFIG_DEFAULT_COOKIE = ".ASPXAUTH"; -// private const string CONFIG_DEFAULT_LOGINURL = "login.aspx"; -//} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TFormsAuthenticationTicket.php b/framework/Web/Security/TFormsAuthenticationTicket.php deleted file mode 100644 index e53b68b2..00000000 --- a/framework/Web/Security/TFormsAuthenticationTicket.php +++ /dev/null @@ -1,124 +0,0 @@ -<?php -/** - * TFormsAuthenticationTicket class. - * Provides access to properties and values of the ticket used with forms - * authentication to identify users. This class cannot be inherited. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TFormsAuthenticationTicket.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -final class TFormsAuthenticationTicket -{ - private $_cookiePath; - private $_expiration; - private $_expired; - private $_isPersistent; - private $_issueDate; - private $_name; - private $_userData; - private $_version; - - public function getCookiePath() - { - return $this->_cookiePath; - } - public function setCookiePath($value) - { - $this->_cookiePath = TPropertyValue::ensureString($value); - } - public function getExpiration() - { - return $this->_expiration; - } - public function setExpiration($value) - { - $this->_expiration = TPropertyValue::ensureString($value); - } - public function getExpired() - { - return $this->_expired; - } - public function setExpired($value) - { - $this->_expired = TPropertyValue::ensureString($value); - } - public function getIsPersistent() - { - return $this->_isPersistent; - } - public function setIsPersistent($value) - { - $this->_isPersistent = TPropertyValue::ensureString($value); - } - public function getIssueDate() - { - return $this->_issueDate; - } - public function setIssueDate($value) - { - $this->_issueDate = TPropertyValue::ensureString($value); - } - public function getName() - { - return $this->_name; - } - public function setName($value) - { - $this->_name = TPropertyValue::ensureString($value); - } - public function getUserData() - { - return $this->_userData; - } - public function setUserData($value) - { - $this->_userData = TPropertyValue::ensureString($value); - } - public function getVersion() - { - return $this->_version; - } - public function setVersion($value) - { - $this->_version = TPropertyValue::ensureString($value); - } - - public function __construct() - { - - } -} -//public sealed class FormsAuthenticationTicket -//{ -// // Methods -// public FormsAuthenticationTicket(string name, bool isPersistent, -//int timeout); -// public FormsAuthenticationTicket(int version, string name, -//DateTime issueDate, DateTime expiration, bool isPersistent, string -//userData); -// public FormsAuthenticationTicket(int version, string name, -//DateTime issueDate, DateTime expiration, bool isPersistent, string -//userData, string cookiePath); -// -// // Properties -// public string CookiePath { get; } -// public DateTime Expiration { get; } -// public bool Expired { get; } -// public bool IsPersistent { get; } -// public DateTime IssueDate { get; } -// public string Name { get; } -// public string UserData { get; } -// public int Version { get; } -// -// // Fields -// private string _CookiePath; -// private DateTime _Expiration; -// private bool _IsPersistent; -// private DateTime _IssueDate; -// private string _Name; -// private string _UserData; -// private int _Version; -//} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TFormsIdentity.php b/framework/Web/Security/TFormsIdentity.php deleted file mode 100644 index f4d00f82..00000000 --- a/framework/Web/Security/TFormsIdentity.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php -/** - * TFormsIdentity class. - * Represents a user identity authenticated using forms authentication. This class cannot be inherited. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TFormsIdentity.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -Prado::using('System.Web.Security.Principal.IIdentity'); -final class TFormsIdentity implements IIdentity -{ - private $_authenticationType; - private $_isAuthenticated=false; - private $_name; - private $_ticket; - - public function getAuthenticationType() - { - return $this->_authenticationType; - } - public function setAuthenticationType($value) - { - $this->_authenticationType = TPropertyValue::ensureString($value); - } - public function getIsAuthenticated() - { - return $this->_isAuthenticated; - } - public function setIsAuthenticated($value) - { - $this->_isAuthenticated = TPropertyValue::ensureBoolean($value); - } - public function getName() - { - return $this->_name; - } - public function setName($value) - { - $this->_name = TPropertyValue::ensureString($value); - } - public function getTicket() - { - return $this->_ticket; - } - public function setTicket($value) - { - $this->_ticket = TPropertyValue::ensureString($value); - } - - public function __construct() - { - - } -} -//public sealed class FormsIdentity : IIdentity -//{ -// // Methods -// public FormsIdentity(FormsAuthenticationTicket ticket); -// -// // Properties -// public string AuthenticationType { get; } -// public bool IsAuthenticated { get; } -// public string Name { get; } -// public FormsAuthenticationTicket Ticket { get; } -// -// // Fields -// private FormsAuthenticationTicket _Ticket; -//} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TMembership.php b/framework/Web/Security/TMembership.php deleted file mode 100644 index e68a0a6a..00000000 --- a/framework/Web/Security/TMembership.php +++ /dev/null @@ -1,208 +0,0 @@ -<?php -/** - * TMembership class. - * Validates user credentials and manages user settings. This class cannot be inherited. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TMembership.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -final class TMembership -{ - private static $_applicationName; - private static $_enablePasswordReset=false; - private static $_enablePasswordRetrieval=false; - private static $_hashAlgorithmType; - private static $_isHashAlgorithmFromMembershipConfig=false; - private static $_maxInvalidPasswordAttempts; - private static $_minRequiredNonAlphanumericCharacters; - private static $_minRequiredPasswordLength; - private static $_passwordAttemptWindow; - private static $_passwordStrengthReqularExpression; - private static $_provider; - private static $_providers; - private static $_requiresQuestionAndAnswer=false; - private static $_userIsOnlineTimeWindow=15; - private static $_punctuations='!@#$%^&*()_-+=[{]};:>./?'; - private static $_hashAlgorithmFromConfig=false; - private static $_initialized=false; - private static $_initializeException; - - public static function getApplicationName() - { - return self::$_applicationName; - } - public static function setApplicationName($value) - { - self::$_applicationName = TPropertyValue::ensureString($value); - } - public static function getEnablePasswordReset() - { - return self::$_enablePasswordReset; - } - public static function getEnablePasswordRetrieval() - { - return self::$_enablePasswordRetrieval; - } - public static function getHashAlgorithmType() - { - return self::$_hashAlgorithmType; - } - public static function getHashAlgorithmFromMembershipConfig() - { - return self::$_isHashAlgorithmFromMembershipConfig; - } - public static function getMaxInvalidPasswordAttempts() - { - return self::$_maxInvalidPasswordAttempts; - } - public static function getMinRequiredNonAlphanumericCharacters() - { - return self::$_minRequiredNonAlphanumericCharacters; - } - public static function getMinRequiredPasswordLength() - { - return self::$_minRequiredPasswordLength; - } - public static function getPasswordAttemptWindow() - { - return self::$_passwordAttemptWindow; - } - public static function getPasswordStrengthReqularExpression() - { - return self::$_passwordStrengthReqularExpression; - } - public static function getProvider() - { - self::initialize(); - return self::$_provider; - } - public static function getProviders($providerName) - { - self::initialize(); - return self::$_providers[$providerName]; - } - public static function getUserIsOnlineTimeWindow() - { - return self::$_userIsOnlineTimeWindow; - } - public static function createUser($username,$password,$email=null,$passwordQuestion=null,$passwordAnswer=null,$isApproved=null,$providerUserKey=null) - { - return self::$_provider->createUser($username,$password,$email,$passwordQuestion,$passwordAnswer,$isApproved,$providerUserKey); - } - public static function deleteUser($username,$deleteAllRelatedData=true) - { - return self::$_provider->deleteUser($username,$deleteAllRelatedData); - } - public static function findUsersByEmail($emailToMatch,$pageIndex=null,$pageSize=null) - { - if ($pageIndex < 0 && $pageIndex!==null) - { - throw new TException('PageIndex_bad',$pageIndex); - } - if ($pageSize > 1 && $pageSize!==null) - { - throw new TException('PageSize_bad',$pageSize); - } - return self::$_provider->findUsersByEmail($emailToMatch,$pageIndex,$pageSize); - } - public static function findUsersByName($usernameToMatch,$pageIndex=null,$pageSize=null) - { - if ($pageIndex < 0 && $pageIndex!==null) - { - throw new TException('PageIndex_bad',$pageIndex); - } - if ($pageSize > 1 && $pageSize!==null) - { - throw new TException('PageSize_bad',$pageSize); - } - return self::$_provider->findUsersByName($usernameToMatch,$pageIndex,$pageSize); - } - public static function generatePassword($length,$numberOfNonAlphanumericCharacters) - { - if (($length < 1) || ($length > 0x80)) - { - throw new TException('Membership_password_length_incorrect'); - } - if (($numberOfNonAlphanumericCharacters > $length) || ($numberOfNonAlphanumericCharacters < 0)) - { - throw new TException('Membership_min_required_non_alphanumeric_characters_incorrect',$numberOfNonAlphanumericCharacters); - } - //need to do the alpha checking in here - // $num1=0; - // $buffer1=null; - // $chArray1; - // $num2=0; - // for ($num3 = 0;$num3 < $length; $num3++) - // { - // $num4 = $buffer[$num3]; - // } - } - public static function getAllUsers($pageIndex=null,$pageSize=null) - { - if ($pageIndex < 0 && $pageIndex!==null) - { - throw new TException('PageIndex_bad',$pageIndex); - } - if ($pageSize > 1 && $pageSize!==null) - { - throw new TException('PageSize_bad',$pageSize); - } - return self::$_provider->getAllUsers($pageIndex,$pageSize); - } - private static function getCurrentUserName() - { - //how to get the current username? - } - public static function getNumberOfUsersOnline() - { - return self::$_provider->getNumberOfUsersOnline(); - } - public static function getUser($username=null,$providerUserKey=null,$userIsOnline=false) - { - if ($username===null && $providerUserKey===null) - { - return self::$_provider->getUser(self::GetCurrentUserName(),null,true); - } - if ($username===null && $providerUserKey!==null) - { - return self::$_provider->getUser(null,$providerUserKey,$userIsOnline); - } - if ($username!==null && $providerUserKey===null) - { - return self::$_provider->getUser($username,null,$userIsOnline); - } - } - public static function getUserNameByEmail($emailToMatch) - { - return self::$_provider->getUserNameByEmail($emailToMatch); - } - private static function initialize() - { - if (self::$_initialized) - { - if (self::$_initializeException!==null) - { - throw new self::$_initializeException; - } - } - else - { - - } - } - public static function updateUser(TMembershipUser $user) - { - if ($user===null) - { - throw new TException('Membership_user_can_not_be_null'); - } - $user->update(); - } - public static function validateUser($username,$password) - { - return self::$_provider->validateUser($username,$password); - } -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TMembershipCreateStatus.php b/framework/Web/Security/TMembershipCreateStatus.php deleted file mode 100644 index 78b64de4..00000000 --- a/framework/Web/Security/TMembershipCreateStatus.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -/** - * TMembershipCreateStatus class. - * Describes the result of a CreateUser operation. - * - * DuplicateEmail The e-mail address already exists in the database for the application. - * DuplicateProviderUserKey The provider user key already exists in the database for the application. - * DuplicateUserName The user name already exists in the database for the application. - * InvalidAnswer The password answer is not formatted correctly. - * InvalidEmail The e-mail address is not formatted correctly. - * InvalidPassword The password is not formatted correctly. - * InvalidProviderUserKey The provider user key is of an invalid type or format. - * InvalidQuestion The password question is not formatted correctly. - * InvalidUserName The user name was not found in the database. - * ProviderError The provider returned an error that is not described by other MembershipCreateStatus enumeration values. - * Success The user was successfully created. - * UserRejected The user was not created, for a reason defined by the provider. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TMembershipCreateStatus.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -class TMembershipCreateStatus extends TEnumerable -{ - const DuplicateEmail='DuplicateEmail'; - const DuplicateProviderUserKey='DuplicateProviderUserKey'; - const DuplicateUserName='DuplicateUserName'; - const InvalidAnswer='InvalidAnswer'; - const InvalidEmail='InvalidEmail'; - const InvalidPassword='InvalidPassword'; - const InvalidProviderUserKey='InvalidProviderUserKey'; - const InvalidQuestion='InvalidQuestion'; - const InvalidUserName='InvalidUserName'; - const ProviderError='ProviderError'; - const Success='Success'; - const UserRejected='UserRejected'; -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TMembershipCreateUserException.php b/framework/Web/Security/TMembershipCreateUserException.php deleted file mode 100644 index def74c8d..00000000 --- a/framework/Web/Security/TMembershipCreateUserException.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** - * TMembershipCreateUserException class. - * The exception that is thrown when a user is not successfully created by a membership provider. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TMembershipCreateUserException.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Configuration.Provider - * @since 3.1 - */ - -Prado::using('System.Exceptions.TException'); -class TMembershipCreateUserException extends TException -{ - -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TMembershipPasswordException.php b/framework/Web/Security/TMembershipPasswordException.php deleted file mode 100644 index faf0c599..00000000 --- a/framework/Web/Security/TMembershipPasswordException.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** - * TMembershipPasswordException class. - * The exception that is thrown when a user is not successfully created by a membership provider. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TMembershipPasswordException.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Configuration.Provider - * @since 3.1 - */ - -Prado::using('System.Exceptions.TException'); -class TMembershipPasswordException extends TException -{ - -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TMembershipPasswordFormat.php b/framework/Web/Security/TMembershipPasswordFormat.php deleted file mode 100644 index fdff0e39..00000000 --- a/framework/Web/Security/TMembershipPasswordFormat.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -/** - * TMembershipPasswordFormat class. - * Describes the encryption format for storing passwords for membership users. - * - * Clear Passwords are not encrypted. - * Encrypted Passwords are encrypted using the encryption settings determined by the - * machineKey Element element configuration. - * Hashed Passwords are encrypted one-way using the SHA1 hashing algorithm. - * You can specify a hashing algorithm different than the SHA1 - * algorithm using the hashAlgorithmType attribute. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TMembershipPasswordFormat.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -class TMembershipPasswordFormat extends TEnumerable -{ - const Clear='Clear'; - const Encrypted='Encrypted'; - const Hashed='Hashed'; -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TMembershipProvider.php b/framework/Web/Security/TMembershipProvider.php deleted file mode 100644 index 446d59d9..00000000 --- a/framework/Web/Security/TMembershipProvider.php +++ /dev/null @@ -1,178 +0,0 @@ -<?php -/** - * TMembershipProvider class. - * Defines the contract that PRADO implements to provide membership services using custom membership providers. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TMembershipProvider.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -Prado::using('System.Configuration.Provider.TProviderBase'); -abstract class TMembershipProvider extends TProviderBase -{ - private $_applicationName; - private $_enablePasswordReset=false; - private $_enablePasswordRetrieval=false; - private $_maxInvalidPasswordAttempts; - private $_minRequiredNonAlphanumericCharacters; - private $_minRequiredPasswordLength; - private $_passwordAttemptWindow; - private $_passwordStrengthRegularExpression; - private $_requiresQuestionAndAnswer=false; - private $_requiresUniqueEmail=false; - /** - * @var string external configuration file - */ - private $_configFile=null; - - public function getEnablePasswordReset() - { - return $this->_enablePasswordReset; - } - public function setEnablePasswordReset($value) - { - $this->_enablePasswordReset = TPropertyValue::ensureBoolean($value); - } - public function getEnablePasswordRetrieval() - { - return $this->_enablePasswordRetrieval; - } - public function setEnablePasswordRetrieval($value) - { - $this->_enablePasswordRetrieval = TPropertyValue::ensureBoolean($value); - } - public function getMaxInvalidPasswordAttempts() - { - return $this->_maxInvalidPasswordAttempts; - } - public function setMaxInvalidPasswordAttempts($value) - { - $this->_maxInvalidPasswordAttempts = TPropertyValue::ensureInteger($value); - } - public function getMinRequiredNonAlphanumericCharacters() - { - return $this->_minRequiredNonAlphanumericCharacters; - } - public function setMinRequiredNonAlphanumericCharacters($value) - { - $this->_minRequiredNonAlphanumericCharacters = TPropertyValue::ensureInteger($value); - } - public function getMinRequiredPasswordLength() - { - return $this->_minRequiredPasswordLength; - } - public function setMinRequiredPasswordLength($value) - { - $this->_minRequiredPasswordLength = TPropertyValue::ensureInteger($value); - } - public function getPasswordAttemptWindow() - { - return $this->_passwordAttemptWindow; - } - public function setPasswordAttemptWindow($value) - { - $this->_passwordAttemptWindow = TPropertyValue::ensureInteger($value); - } - public function getPasswordStrengthRegularExpression() - { - return $this->_passwordStrengthRegularExpression; - } - public function setPasswordStrengthRegularExpression($value) - { - $this->_passwordStrengthRegularExpression = TPropertyValue::ensureString($value); - } - public function getRequiresQuestionAndAnswer() - { - return $this->_requiresQuestionAndAnswer; - } - public function setRequiresQuestionAndAnswer($value) - { - $this->_requiresQuestionAndAnswer = TPropertyValue::ensureString($value); - } - public function getRequiresUniqueEmail() - { - return $this->_requiresUniqueEmail; - } - public function setRequiresUniqueEmail($value) - { - $this->_requiresUniqueEmail = TPropertyValue::ensureBoolean($value); - } - - public function __construct() - { - - } - public function init($config) - { - if($this->_configFile!==null) - { - if(is_file($this->_configFile)) - { - $dom=new TXmlDocument; - $dom->loadFromFile($this->_configFile); - $this->loadConfig($dom); - } - else - throw new TConfigurationException('membershipprovider_configfile_invalid',$this->_configFile); - } - $this->loadConfig($config); - } - /** - * Loads configuration from an XML element - * @param TXmlElement configuration node - * @throws TConfigurationException if log route class or type is not specified - */ - private function loadConfig($xml) - { - foreach($xml->getElementsByTagName('provider') as $providerConfig) - { - $properties=$providerConfig->getAttributes(); - if(($class=$properties->remove('class'))===null) - throw new TConfigurationException('membershipprovider_routeclass_required'); - $provider=Prado::createComponent($class); - if(!($provider instanceof TMembershipProvider)) - throw new TConfigurationException('membershipprovider_routetype_invalid'); - foreach($properties as $name=>$value) - $provider->setSubproperty($name,$value); - $this->_providers[]=$provider; - $provider->init($providerConfig); - } - } - public abstract function changePassword($username,$oldPassword,$newPassword); - public abstract function changePasswordQuestionAndAnswer($username,$password,$newPasswordQuestion,$newPasswordAnswer); - public abstract function createUser($username,$password,$email,$passwordQuestion,$passwordAnswer,$isApproved,$providerUserKey); - protected function decryptPassword($encodedPassword) - { - - } - public abstract function deleteUser($username,$deleteAllRelatedData); - public function encodePassword($pass,$passwordFormat,$salt) - { - - } - protected function encryptPassword($password) - { - - } - public abstract function findUsersByEmail($emailToMatch,$pageIndex=null,$pageSize=null); - public abstract function findUsersByName($usernameToMatch,$pageIndex=null,$pageSize=null); - public function generateSalt() - { - - } - public abstract function getAllUsers($pageIndex=null,$pageSize=null); - public abstract function getNumberOfUsersOnline(); - public abstract function getPassword($username,$answer); - public abstract function getMembershipUser($username=null,$providerUserKey=null,$userIsOnline=false); - public abstract function getUserNameByEmail($email); - public abstract function resetPassword($username,$answer); - public function unEncodePassword($pass,$passwordFormat) - { - - } - public abstract function unlockUser($userName); - public abstract function updateUser(TMembershipUser $user); - public abstract function validateUser($username,$password); -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TMembershipUser.php b/framework/Web/Security/TMembershipUser.php deleted file mode 100644 index ad7b9f78..00000000 --- a/framework/Web/Security/TMembershipUser.php +++ /dev/null @@ -1,165 +0,0 @@ -<?php -/** - * TMembershipUser class. - * Exposes and updates membership user information in the membership data store. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TMembershipUser.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -Prado::using('System.Web.Security.TProviderException'); -Prado::using('System.Web.Security.TMembership'); -class TMembershipUser -{ - private $_comment; - private $_creationDate; - private $_email; - private $_isApproved=false; - private $_isLockedOut=false; - private $_isOnline=false; - private $_lastActivityDate; - private $_lastLockoutDate; - private $_lastLoginDate; - private $_lastPasswordChangedDate; - private $_passwordQuestion; - private $_providerName; - private $_providerUserKey; - private $_userName; - - public function __construct($providerName=null,$name=null,$providerUserKey=null,$email=null,$passwordQuestion=null,$comment=null,$isApproved=null,$isLockedOut=null,$creationDate=null,$lastLoginDate=null,$lastActivityDate=null,$lastPasswordChangedDate=null,$lastLockoutDate=null) - { - if (($providerName===null) || (TMembership::getProviders($providerName)===null)) - { - throw new TProviderException('Membership_provider_name_invalid',$providerName); - } - if ($name!==null) - { - $name = trim($name); - } - if ($email!==null) - { - $email = trim($email); - } - if ($passwordQuestion!==null) - { - $passwordQuestion = trim($passwordQuestion); - } - $this->_providerName = $providerName; - $this->_userName = $name; - $this->_providerUserKey = $providerUserKey; - $this->_email = $email; - $this->_passwordQuestion = $passwordQuestion; - $this->_comment = $comment; - $this->_isApproved = $isApproved; - $this->_isLockedOut = $isLockedOut; - $this->_creationDate = $creationDate; - $this->_lastLoginDate = $lastLoginDate; - $this->_lastActivityDate = $lastActivityDate; - $this->_lastPasswordChangedDate = $lastPasswordChangedDate; - $this->_lastLockoutDate = $lastLockoutDate; - } - public function getComment() - { - return $this->_comment; - } - public function setApplicationName($value) - { - $this->_comment = TPropertyValue::ensureString($value); - } - public function getCreationDate() - { - return $this->_creationDate; - } - public function getEmail() - { - return $this->_email; - } - public function setEmail($value) - { - $this->_email = TPropertyValue::ensureString($value); - } - public function getIsApproved() - { - return $this->_isApproved; - } - public function setIsApproved($value) - { - $this->_isApproved = TPropertyValue::ensureBoolean($value); - } - public function getIsLockedOut() - { - return $this->_isLockedOut; - } - public function getIsOnline() - { - return $this->_isOnline; - } - public function getLastActivityDate() - { - return $this->_lastActivityDate; - } - public function setLastActivityDate($value) - { - $this->_lastActivityDate = TPropertyValue::ensureString($value); - } - public function getLastLockoutDate() - { - return $this->_lastLockoutDate; - } - public function getLastLoginDate() - { - return $this->_lastLoginDate; - } - public function setLastLoginDate($value) - { - $this->_lastLoginDate = TPropertyValue::ensureString($value); - } - public function getLastPasswordChangedDate() - { - return $this->_lastPasswordChangedDate; - } - public function getPasswordQuestion() - { - return $this->_passwordQuestion; - } - public function getProviderUserKey() - { - return $this->_providerUserKey; - } - public function getUserName() - { - return $this->_userName; - } - public function changePassword($oldPassword,$newPassword,$throwOnError=null) - { - - } - public function getPassword() - { - // $throwOnError; - // $passwordAnswer; - // $answer; - // $answer,$useAnswer,$throwOnError; - } - public function resetPassword() - { - // $throwOnError; - // $passwordAnswer; - // $answer; - // $answer,$useAnswer,$throwOnError; - } - public function unlockUser() - { - - } - public function update() - { - - } - private function updateSelf() - { - - } -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TProviderException.php b/framework/Web/Security/TProviderException.php deleted file mode 100644 index 7239585c..00000000 --- a/framework/Web/Security/TProviderException.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -class TProviderException extends TException -{ - -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TRoleManagerModule.php b/framework/Web/Security/TRoleManagerModule.php deleted file mode 100644 index 79c6b7a5..00000000 --- a/framework/Web/Security/TRoleManagerModule.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php -/** - * TRoleManagerModule class. - * Manages a TRolePrincipal instance for the current user. This class cannot be inherited. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TRoleManagerModule.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -final class TRoleManagerModule extends TModule -{ - -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TRolePrincipal.php b/framework/Web/Security/TRolePrincipal.php deleted file mode 100644 index 682f2cbe..00000000 --- a/framework/Web/Security/TRolePrincipal.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -final class TRolePrincipal -{ - -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TRoleProvider.php b/framework/Web/Security/TRoleProvider.php deleted file mode 100644 index a83bfb0b..00000000 --- a/framework/Web/Security/TRoleProvider.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** - * TRoleProvider class. - * Defines the contract that PRADO implements to provide role-management services using custom role providers. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TRoleProvider.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -Prado::using('System.Configuration.Provider.TProviderBase'); -abstract class TRoleProvider extends TProviderBase -{ - private $_cacheRolesInCookie=false; - private $_cookieName="PRADO"; - private $_cookieTimeout="30"; - private $_cookiePath="/"; - private $_cookieRequireSSL=false; - private $_cookieSlidingExpiration=true; - - public function getCacheRolesInCookie() - { - return $this->_cacheRolesInCookie; - } - public function setCacheRolesInCookie($value) - { - $this->_cacheRolesInCookie = TPropertyValue::ensureBoolean($value); - } - public function getCookieName() - { - return $this->_cookieName; - } - public function setCookieName($value) - { - $this->_cookieName = TPropertyValue::ensureString($value); - } - public function getCookiePath() - { - return $this->_cookiePath; - } - public function setCookiePath($value) - { - $this->_cookiePath = TPropertyValue::ensureString($value); - } - public function getCookieRequireSSL() - { - return $this->_cookieRequireSSL; - } - public function setCookieRequireSSL($value) - { - $this->_cookieRequireSSL = TPropertyValue::ensureBoolean($value); - } - public function getCookieSlidingExpiration() - { - return $this->_cookieSlidingExpiration; - } - public function setCookieSlidingExpiration($value) - { - $this->_cookieSlidingExpiration = TPropertyValue::ensureBoolean($value); - } - public function getCookieTimeout() - { - return $this->_cookieTimeout; - } - public function setCookieTimeout($value) - { - $this->_cookieTimeout = TPropertyValue::ensureInteger($value); - } - - - public function __construct() - { - - } - public abstract function addUsersToRoles($usernames,$roleNames); - public abstract function createRole($roleName); - public abstract function deleteRole($roleName); - public abstract function findUsersInRole($roleName,$usernameToMatch); - public abstract function getAllRoles(); - public abstract function getRolesForUser($username); - public abstract function getUsersIsRole($username,$roleName); - public abstract function isUserIsRole($username,$roleName); - public abstract function removeUsersFromRoles($usernames,$roleNames); - public abstract function roleExists($roleName); -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TRoles.php b/framework/Web/Security/TRoles.php deleted file mode 100644 index 8072cb64..00000000 --- a/framework/Web/Security/TRoles.php +++ /dev/null @@ -1,237 +0,0 @@ -<?php -/** - * TRoles class. - * Manages user membership in roles for authorization checking in an PRADO application. This class cannot be inherited. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TRoles.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -Prado::using('System.Web.Security.TProviderException'); -final class TRoles -{ - private static $_applicationName; - private static $_cacheRolesInCookie=false; - private static $_cookieName; - private static $_cookiePath; - private static $_cookieProtectionValue; - private static $_cookieRequireSSL=false; - private static $_cookieSlidingExpiration=false; - private static $_cookieTimeout; - private static $_createPersistentCookie=false; - private static $_domain; - private static $_enabled=false; - private static $_maxCachedResults; - private static $_provider; - private static $_providers; - private static $_enabledSet=false; - private static $_initialized=false; - private static $_initializeException; - - public static function getApplicationName() - { - return self::$_applicationName; - } - public static function setApplicationName($value) - { - self::$_applicationName = TPropertyValue::ensureString($value); - } - public static function getCacheRolesInCookie() - { - return self::$_cacheRolesInCookie; - } - public static function getCookieName() - { - return self::$_cookieName; - } - public static function getCookiePath() - { - return self::$_cookiePath; - } - public static function getCookieProtectionValue() - { - return self::$_cookieProtectionValue; - } - public static function getCookieRequireSSL() - { - return self::$_cookieRequireSSL; - } - public static function getCookieSlidingExpiration() - { - return self::$_cookieSlidingExpiration; - } - public static function getCookieTimeout() - { - return self::$_cookieTimeout; - } - public static function getCreatePersistentCookie() - { - return self::$_createPersistentCookie; - } - public static function getDomain() - { - return self::$_domain; - } - public static function getEnabled() - { - return self::$_enabled; - } - public static function getMaxCachedResults() - { - return self::$_maxCachedResults; - } - public static function getProvider() - { - return self::$_provider; - } - public static function getProviders() - { - return self::$_providers; - } - - public static function addUsersToRole($usernames,$roleName) - { - - } - public static function addUsersToRoles($usernames,$roleNames) - { - - } - public static function addUserToRole($username,$roleName) - { - - } - public static function addUserToRoles($username,$roleNames) - { - - } - public static function createRole($roleName) - { - self::ensureEnabled(); - self::$_provider->createRole($roleName); - } - public static function deleteCookie() - { - - } - public static function deleteRole($roleName,$throwOnPopulatedRole=true) - { - self::ensureEnabled(); - - // $flag1 = self::$_Provider->DeleteRole($roleName,$throwOnPopulatedRole); - // try - // { - // $principal1 = self::GetCurrentUser(); - // } - // catch () - // { - // - // } - - } - private static function ensureEnabled() - { - self::initialize(); - if (!self::$_Initialized) - { - throw new TProviderException('Roles_feature_not_enabled'); - } - } - public static function findUsersInRole($roleName,$usernameToMatch) - { - - } - public static function getAllRoles() - { - - } - private static function getCurrentUser() - { - - } - private static function getCurrentUserName() - { - - } - public static function getRolesForUser($username=null) - { - - } - public static function getUsersInRole($roleName) - { - - } - private static function initialize() - { - if (self::$_initialized) - { - if (self::$_initializeException!==null) - { - throw new $_initializeException; - } - } - else - { - if (self::$_initialized) - { - if (self::$_initializeException!==null) - { - throw new $_initializeException; - } - return; - } - try - { - self::$_enabled; - self::$_cookieName; - self::$_cookiePath; - self::$_cacheRolesInCookie; - self::$_cookieTimeout; - self::$_cookiePath; - self::$_cookieRequireSSL; - self::$_cookieSlidingExpiration; - self::$_cookieProtectionValue; - self::$_domain; - self::$_createPersistentCookie; - self::$_maxCachedResults; - if (self::$_enabled) - { - if (self::$_maxCachedResults < 0) - { - throw new TProviderException('Value_must_be_non_negative_integer',self::$_MaxCachedResults); - }////stopped here - } - } - catch (TException $e) - { - - } - } - } - public static function isUserInRole($roleName,$username=null) - { - - } - public static function removeUserFromRole($username,$roleName) - { - - } - public static function remoreUserFromRoles($username,$roleNames) - { - - } - public static function removeUsersFromRole($usernames,$roleName) - { - - } - public static function removeUsersFromRoles($usernames,$roleNames) - { - - } - public static function roleExists($roleName) - { - - } -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TSqlMembershipProvider.php b/framework/Web/Security/TSqlMembershipProvider.php deleted file mode 100644 index 87e9015f..00000000 --- a/framework/Web/Security/TSqlMembershipProvider.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -Prado::using('System.Web.Security.TMembershipProvider'); -class TSqlMembershipProvider extends TMembershipProvider -{ - private $_connectionStringName; - - public function getConnectionStringName() - { - return $this->_connectionStringName; - } - public function setConnectionStringName($value) - { - $this->_connectionStringName = TPropertyValue::ensureString($value); - } - - - public function __construct() - { - - } - public function changePassword($username,$oldPassword,$newPassword) - { - - } - public function changePasswordQuestionAndAnswer($username,$password,$newPasswordQuestion,$newPasswordAnswer) - { - - } - public function createUser($username,$password,$email,$passwordQuestion,$passwordAnswer,$isApproved,$providerUserKey) - { - - } - public function deleteUser($username,$deleteAllRelatedData) - { - - } - public function findUsersByEmail($emailToMatch,$pageIndex=null,$pageSize=null) - { - - } - public function findUsersByName($usernameToMatch,$pageIndex=null,$pageSize=null) - { - - } - public function getAllUsers($pageIndex=null,$pageSize=null) - { - - } - public function getNumberOfUsersOnline() - { - - } - public function getPassword($username,$answer) - { - - } - public function getMembershipUser($username=null,$providerUserKey=null,$userIsOnline=false) - { - Prado::using('System.Web.Security.TMembershipUser'); - return new TMembershipUser($this->getID()); - } - public function getUserNameByEmail($email) - { - - } - public function resetPassword($username,$answer) - { - - } - public function unlockUser($userName) - { - - } - public function updateUser(TMembershipUser $user) - { - - } - public function validateUser($username,$password) - { - - } -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TSqlRoleProvider.php b/framework/Web/Security/TSqlRoleProvider.php deleted file mode 100644 index 7eadc265..00000000 --- a/framework/Web/Security/TSqlRoleProvider.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -/** - * TSqlRoleProvider class. - * Defines the contract that PRADO implements to provide role-management services using custom role providers. - * - * @author Jason Ragsdale <jrags@jasrags.net> - * @version $Id: TSqlRoleProvider.php 1398 2006-09-08 19:31:03Z xue $ - * @package System.Web.Security - * @since 3.1 - */ -Prado::using('System.Web.Security.TRoleProvider'); -class TSqlRoleProvider extends TRoleProvider -{ - private $_connectionStringName; - - public function getConnectionStringName() - { - return $this->_connectionStringName; - } - public function setConnectionStringName($value) - { - $this->_connectionStringName = TPropertyValue::ensureString($value); - } - - public function __construct() - { - - } - public function addUsersToRoles($usernames,$roleNames) - { - - } - public function createRole($roleName) - { - - } - public function deleteRole($roleName) - { - - } - public function findUsersInRole($roleName,$usernameToMatch) - { - - } - public function getAllRoles() - { - - } - public function getRolesForUser($username) - { - - } - public function getUsersIsRole($username,$roleName) - { - - } - public function isUserIsRole($username,$roleName) - { - - } - public function removeUsersFromRoles($usernames,$roleNames) - { - - } - public function roleExists($roleName) - { - - } -} -?>
\ No newline at end of file diff --git a/framework/Web/Security/TUrlAuthorizationModule.php b/framework/Web/Security/TUrlAuthorizationModule.php deleted file mode 100644 index c321d95d..00000000 --- a/framework/Web/Security/TUrlAuthorizationModule.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -final class TUrlAuthorizationModule -{ - -} -?>
\ No newline at end of file |