Skip to content

Commit

Permalink
Merge pull request #97 from basz/laminas-migration
Browse files Browse the repository at this point in the history
Laminas migration
  • Loading branch information
prolic committed Jan 17, 2020
2 parents 0a310fa + 090e025 commit 11ff8af
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -143,7 +143,7 @@ $response = $authorizationServer->handleRequest($request, $user);

The AuthorizationServerMiddleware is able to do this for you and retrieve a user instance from a (configurable) request attribute. It is up to you to provide middleware which runs with a higher priority to add a TokenOwnerInterface instance to the request attribute.

Example of such a implementation which uses ZendAuthentication and a TemplateRenderer from ZendExpressive.
Example of such a implementation which uses LaminasAuthentication and a TemplateRenderer from Mezzio.

```
final class OAuth2AuthorizationFlow
Expand Down Expand Up @@ -232,7 +232,7 @@ if (!$token = $resourceServer->getAccessToken($request, ['write']) {

The ResourceServerMiddleware is able to do this for you, simply have it run before any other middleware.

Example zend expressive route configuration.
Example mezzio expressive route configuration.

```
[
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -23,7 +23,7 @@
],
"require": {
"php": "^7.0",
"zendframework/zend-diactoros": "^1.1",
"laminas/laminas-diactoros": "^1.1",
"psr/container": "^1.0",
"ramsey/uuid": "^3.1",
"roave/security-advisories": "dev-master",
Expand Down
2 changes: 1 addition & 1 deletion src/AuthorizationServer.php
Expand Up @@ -21,10 +21,10 @@

namespace ZfrOAuth2\Server;

use Laminas\Diactoros\Response;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Throwable;
use Zend\Diactoros\Response;
use ZfrOAuth2\Server\Exception\OAuth2Exception;
use ZfrOAuth2\Server\Grant\AuthorizationServerAwareInterface;
use ZfrOAuth2\Server\Grant\GrantInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Grant/AbstractGrant.php
Expand Up @@ -21,8 +21,8 @@

namespace ZfrOAuth2\Server\Grant;

use Laminas\Diactoros\Response;
use Psr\Http\Message\ResponseInterface;
use Zend\Diactoros\Response;
use ZfrOAuth2\Server\Model\AccessToken;
use ZfrOAuth2\Server\Model\RefreshToken;

Expand Down
2 changes: 1 addition & 1 deletion src/Grant/AuthorizationGrant.php
Expand Up @@ -21,9 +21,9 @@

namespace ZfrOAuth2\Server\Grant;

use Laminas\Diactoros\Response;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Zend\Diactoros\Response;
use ZfrOAuth2\Server\AuthorizationServerInterface;
use ZfrOAuth2\Server\Exception\OAuth2Exception;
use ZfrOAuth2\Server\Model\Client;
Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/ResourceServerMiddleware.php
Expand Up @@ -21,11 +21,11 @@

namespace ZfrOAuth2\Server\Middleware;

use Laminas\Diactoros\Response\JsonResponse;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Zend\Diactoros\Response\JsonResponse;
use ZfrOAuth2\Server\Exception\InvalidAccessTokenException;
use ZfrOAuth2\Server\ResourceServerInterface;

Expand Down
2 changes: 1 addition & 1 deletion tests/src/Middleware/ResourceServerMiddlewareTest.php
Expand Up @@ -20,11 +20,11 @@

namespace ZfrOAuth2Test\Server\Middleware;

use Laminas\Diactoros\Response\JsonResponse;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface as RequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Zend\Diactoros\Response\JsonResponse;
use ZfrOAuth2\Server\Exception\InvalidAccessTokenException;
use ZfrOAuth2\Server\Middleware\ResourceServerMiddleware;
use ZfrOAuth2\Server\Model\AccessToken;
Expand Down
1 change: 0 additions & 1 deletion tests/src/Model/AuthorizationCodeTest.php
Expand Up @@ -22,7 +22,6 @@

use PHPUnit\Framework\TestCase;
use ZfrOAuth2\Server\Model\AuthorizationCode;
use ZfrOAuth2\Server\Model\Client;

/**
* @author Michaël Gallego <mic.gallego@gmail.com>
Expand Down

0 comments on commit 11ff8af

Please sign in to comment.