Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added in namespace to HttpDigestAuth and standardised the usage examp…

…le in class
  • Loading branch information...
commit a831f4e0a7e52ea7b982edaa9fe0e5b1640412d6 1 parent b1260d9
@silentworks silentworks authored
View
12 Middleware/CsrfGuard.php
@@ -1,4 +1,16 @@
<?php
+/**
+ * CSRF Guard
+ *
+ * Use this middleware with your Slim Framework application
+ * to protect you from CSRF attacks.
+ *
+ * USAGE
+ *
+ * $app = new \Slim\Slim();
+ * $app->add(new \Slim\Extras\Middleware\CsrfGuard());
+ *
+ */
namespace Slim\Extras\Middleware;
class CsrfGuard extends \Slim\Middleware
View
4 Middleware/HttpBasicAuth.php
@@ -11,8 +11,8 @@
*
* USAGE
*
- * $app = new Slim();
- * $app->add(new HttpBasicAuth('theUsername', 'thePassword'));
+ * $app = new \Slim\Slim();
+ * $app->add(new \Slim\Extras\Middleware\HttpBasicAuth('theUsername', 'thePassword'));
*
* MIT LICENSE
*
View
8 Middleware/HttpDigestAuth.php
@@ -15,8 +15,8 @@
*
* USAGE
*
- * $app = new Slim();
- * $app->add(new HttpDigestAuth(array('user1' => 'password1', 'user2' => 'password2')));
+ * $app = new \Slim\Slim();
+ * $app->add(new \Slim\Extras\Middleware\HttpDigestAuth(array('user1' => 'password1', 'user2' => 'password2')));
*
* MIT LICENSE
*
@@ -39,7 +39,9 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-class HttpDigestAuth extends Slim_Middleware {
+namespace Slim\Extras\Middleware;
+
+class HttpDigestAuth extends \Slim\Middleware {
/**
* @var array
*/
View
7 Middleware/StrongAuth.php
@@ -10,12 +10,9 @@
* @copyright 2012 Andrew Smith
*
* USAGE
- *
- * use Slim\Slim;
- * use Slim\Extras\Middleware\StrongAuth;
*
- * $app = new Slim();
- * $app->add(new StrongAuth(array('provider' => 'PDO', 'dsn' => 'sqlite:memory')));
+ * $app = new \Slim\Slim();
+ * $app->add(new \Slim\Extras\Middleware\StrongAuth(array('provider' => 'PDO', 'dsn' => 'sqlite:memory')));
*
* MIT LICENSE
*
View
2  composer.json
@@ -2,7 +2,7 @@
"name": "slim/extras",
"type": "library",
"description": "Extras package for the Slim Framework",
- "keywords": ["templating", "extensions"],
+ "keywords": ["templating", "extensions", "middleware"],
"homepage": "http://github.com/codeguy/Slim-Extras",
"license": "MIT",
"authors": [

0 comments on commit a831f4e

Please sign in to comment.
Something went wrong with that request. Please try again.