Skip to content

Commit

Permalink
bump dependencies and tweak docs
Browse files Browse the repository at this point in the history
  • Loading branch information
schnittstabil committed Apr 4, 2016
1 parent 2599b0e commit c75f2cd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"require": {
"php": ">=5.6.0",
"psr/http-message": "^1.0",
"schnittstabil/csrf-tokenservice": "^1.0",
"schnittstabil/psr7-middleware-stack": "^2.0",
"schnittstabil/csrf-tokenservice": "^2.0",
"schnittstabil/psr7-middleware-stack": "^3.0",
"schnittstabil/get": "^2.0"
},
"suggest": {
Expand Down
6 changes: 4 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![SensioLabsInsight](https://insight.sensiolabs.com/projects/189bdd73-5c9b-489f-bdd9-a4d139250502/big.png)](https://insight.sensiolabs.com/projects/189bdd73-5c9b-489f-bdd9-a4d139250502)

> Stateless PSR-7 CSRF (Cross-Site Request Forgery) protection middleware - simple Slim Framework 3 integration.
> Stateless PSR-7 CSRF (Cross-Site Request Forgery) protection middleware :lock_with_ink_pen:

## Install
Expand Down Expand Up @@ -43,7 +43,9 @@ $csrfMiddleware = CsrfMiddlewareBuilder::create($key)
```


### Slim Example
### Slim v3 Example

* See [csrf-twig-helpers/examples](https://github.com/schnittstabil/csrf-twig-helpers) for a complete Slim-Twig Example.

```php
<?php
Expand Down
11 changes: 6 additions & 5 deletions src/Middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@

namespace Schnittstabil\Psr7\Csrf;

use Schnittstabil\Csrf\TokenService;
use Schnittstabil\Csrf\TokenServiceInterface;
use Schnittstabil\Csrf\TokenService\TokenService;
use Schnittstabil\Csrf\TokenService\TokenServiceInterface;
use Schnittstabil\Psr7\Csrf\Middlewares\AcceptHeaderToken;
use Schnittstabil\Psr7\Csrf\Middlewares\AcceptMethods;
use Schnittstabil\Psr7\Csrf\Middlewares\AcceptParsedBodyToken;
use Schnittstabil\Psr7\Csrf\Middlewares\Guard;
use Schnittstabil\Psr7\Csrf\Middlewares\GuardInterface;
use Schnittstabil\Psr7\Csrf\Middlewares\RespondWithCookieToken;
use Schnittstabil\Psr7\Csrf\Middlewares\RespondWithHeaderToken;
use Schnittstabil\Psr7\Middleware\CallableStackTrait;
use Schnittstabil\Psr7\MiddlewareStack\CallableMiddlewareStackTrait;
use Schnittstabil\Psr7\MiddlewareStack\MiddlewareStackInterface;

/**
* CSRF protection middleware.
*/
class Middleware implements \Schnittstabil\Psr7\Middleware\StackInterface
class Middleware implements MiddlewareStackInterface
{
use CallableStackTrait;
use CallableMiddlewareStackTrait;

protected $isGuarded;
protected $tokenService;
Expand Down
4 changes: 2 additions & 2 deletions src/MiddlewareBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Schnittstabil\Psr7\Csrf;

use Schnittstabil\Csrf\TokenService;
use Schnittstabil\Csrf\TokenServiceInterface;
use Schnittstabil\Csrf\TokenService\TokenService;
use Schnittstabil\Csrf\TokenService\TokenServiceInterface;

/**
* CSRF protection middleware builder.
Expand Down
2 changes: 1 addition & 1 deletion tests/MiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Schnittstabil\Psr7\Csrf;

use Schnittstabil\Csrf\TokenServiceInterface;
use Schnittstabil\Csrf\TokenService\TokenServiceInterface;
use Schnittstabil\Psr7\Csrf\Middlewares\GuardInterface;

/**
Expand Down

0 comments on commit c75f2cd

Please sign in to comment.