summaryrefslogtreecommitdiff
path: root/demos/providers/protected
diff options
context:
space:
mode:
authorjrags <>2006-11-01 04:47:01 +0000
committerjrags <>2006-11-01 04:47:01 +0000
commit6d28e3f62535bb637b08287585bf9c13dfd756d2 (patch)
treeea8e6ba21ff3f5fcf7c16933d7c9a8ed224a2412 /demos/providers/protected
parentb4403995107c4440b4e19dd5e5e8385e0eac2a5a (diff)
Update of new Security code, currently working on making TLogin functional so we can test the providers soon.
Diffstat (limited to 'demos/providers/protected')
-rw-r--r--demos/providers/protected/application.xml74
-rw-r--r--demos/providers/protected/pages/Home.page2
-rw-r--r--demos/providers/protected/pages/Home.php20
3 files changed, 50 insertions, 46 deletions
diff --git a/demos/providers/protected/application.xml b/demos/providers/protected/application.xml
index d9258934..4763b2a6 100644
--- a/demos/providers/protected/application.xml
+++ b/demos/providers/protected/application.xml
@@ -3,41 +3,45 @@
<application id="Providers" mode="Debug">
<modules>
- <module id="MembershipProvider"
- class="System.Configuration.TProtectedConfiguration"
- defaultProvider="SqlMembershipProvider" >
- <provider
- id="SqlMembershipProvider"
- Description="Our SQL Membership provider"
- class="System.Web.Security.TSqlMembershipProvider"
- ConnectionStringName="SqlMembershipProvider"
- Enabled="true"
- EnablePasswordReset="True"
- EnablePasswordRetrieval="True"
- MaxInvalidPasswordAttempts="5"
- MinRequiredNonAlphanumericCharacters="5"
- MinRequiredPasswordLength="5"
- PasswordAttemptWindow="5"
- PasswordStrengthRegularExpression=""
- RequiresQuestionAndAnswer="True"
- RequiresUniqueEmail="True"/>
- </module>
+ <module id="FormsAuthentication"
+ class="System.Web.Security.TFormsAuthenticationModule"
+ defaultProvider="MembershipProvider"/>
+
+ <module id="MembershipProvider"
+ class="System.Configuration.TProtectedConfiguration"
+ defaultProvider="SqlMembershipProvider" >
+ <provider
+ id="SqlMembershipProvider"
+ Description="Our SQL Membership provider"
+ class="System.Web.Security.TSqlMembershipProvider"
+ ConnectionStringName="SqlMembershipProvider"
+ Enabled="true"
+ EnablePasswordReset="True"
+ EnablePasswordRetrieval="True"
+ MaxInvalidPasswordAttempts="5"
+ MinRequiredNonAlphanumericCharacters="5"
+ MinRequiredPasswordLength="5"
+ PasswordAttemptWindow="5"
+ PasswordStrengthRegularExpression=""
+ RequiresQuestionAndAnswer="True"
+ RequiresUniqueEmail="True"/>
+ </module>
- <module id="RoleProvider"
- class="System.Configuration.TProtectedConfiguration"
- defaultProvider="SqlRoleProvider">
- <provider
- id="SqlRoleProvider"
- class="System.Web.Security.TSqlRoleProvider"
- ConnectionStringName="SqlRoleProvider"
- ApplicationName="SampleApplication"
- Enabled="true"
- CacheRolesInCookie="True"
- CookieName="PRADO"
- CookieTimeout="30"
- CookiePath="/"
- CookieRequireSSL="False"
- CookieSlidingExpiration="True"/>
- </module>
+ <module id="RoleProvider"
+ class="System.Configuration.TProtectedConfiguration"
+ defaultProvider="SqlRoleProvider">
+ <provider
+ id="SqlRoleProvider"
+ class="System.Web.Security.TSqlRoleProvider"
+ ConnectionStringName="SqlRoleProvider"
+ ApplicationName="SampleApplication"
+ Enabled="true"
+ CacheRolesInCookie="True"
+ CookieName="PRADO"
+ CookieTimeout="30"
+ CookiePath="/"
+ CookieRequireSSL="False"
+ CookieSlidingExpiration="True"/>
+ </module>
</modules>
</application> \ No newline at end of file
diff --git a/demos/providers/protected/pages/Home.page b/demos/providers/protected/pages/Home.page
index 10069478..27be9e58 100644
--- a/demos/providers/protected/pages/Home.page
+++ b/demos/providers/protected/pages/Home.page
@@ -1,4 +1,4 @@
-<h1>Welcome to Prado!</h1>
+<h1>Provider Demo</h1>
<com:TForm>
<com:TLogin ID="LoginCtrl" MembershipProvider="SqlMembershipProvider"/>
</com:TForm> \ No newline at end of file
diff --git a/demos/providers/protected/pages/Home.php b/demos/providers/protected/pages/Home.php
index bbcbc20b..0c6320e4 100644
--- a/demos/providers/protected/pages/Home.php
+++ b/demos/providers/protected/pages/Home.php
@@ -6,22 +6,22 @@ class Home extends TPage
Prado::using('System.Util.TVarDumper');
Prado::using('System.Web.Security.TSqlMembershipProvider');
Prado::using('System.Configuration.TProtectedConfiguration');
- // TRoles::CreateRole('test');
- // TMembership::ValidateUser('test','test');
- // echo TVarDumper::dump(TProtectedConfiguration::getDefaultProvider(),10,true);
- // echo TVarDumper::dump($this->Application->getModule('ProtectedConfiguration'),10,true);
-
// Access by provider id
// $MembershipProvider = $this->Application->getModule('MembershipProvider')->getProvider('SqlMembershipProvider');
- // or just get the default provider
- $MembershipProvider = $this->Application->getModule('MembershipProvider')->Provider;
- // $RoleProvider = $this->Application->getModule('RoleProvider')->Provider;
+
+
/* @VAR $MembershipProvider TSqlMembershipProvider */
+ // $MembershipProvider = $this->Application->getModule('MembershipProvider')->Provider;
+ // echo TVarDumper::dump($MembershipProvider,10,true);
+
/* @VAR $RoleProvider TSqlRoleProvider */
- echo TVarDumper::dump($MembershipProvider,10,true);
- echo TVarDumper::dump($MembershipProvider->getMembershipUser('testUser'),10,true);
+ // $RoleProvider = $this->Application->getModule('RoleProvider')->Provider;
// echo TVarDumper::dump($RoleProvider,10,true);
+
+ /* @VAR $FormsAuthentication TFormsAuthenticationModule */
+ $FormsAuthentication = $this->Application->getModule('FormsAuthentication');
+ // echo TVarDumper::dump($FormsAuthentication,10,true);
}
}
?> \ No newline at end of file