Skip to content

Commit

Permalink
Merge branch '4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
klapaudius committed Aug 5, 2022
2 parents 0ab7a72 + b54cd5d commit 7ce8810
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 21 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ vendor/
composer.lock
/.php-cs-fixer.cache
/.phpunit.result.cache

.DS_Store
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ language: php

sudo: true
php:
- 7.4
- 8.0
- 8.1

service:
- docker
Expand All @@ -12,13 +12,9 @@ service:
matrix:
fast_finish: true
include:
- php: 7.4
env: SYMFONY_VERSION=5.4.*
- php: 8.0
env: SYMFONY_VERSION=5.4.*
- php: 7.4
env: SYMFONY_VERSION=6.0.*
- php: 8.0
- php: 8.1
env: SYMFONY_VERSION=6.0.*

cache:
Expand Down
2 changes: 1 addition & 1 deletion Controller/AuthorizeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ protected function processSuccess(UserInterface $user, AuthorizeFormHandler $for
try {
return $this->oAuth2Server
->finishClientAuthorization($formHandler->isAccepted(), $user, $request, $formHandler->getScope())
;
;
} catch (OAuth2ServerException $e) {
return $e->getHttpResponse();
}
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ The bulk of the documentation is stored in the `Resources/doc/index.md` file in

## Repository history

This repository has been created to remove the deprecated warnings on Symfony 4.2 since several pull requests were not reviewed on FriendsOfSymfony/FOSOAuthServerBundle.
It is actively maintained and works on Symfony 5 (branch 3.0) and Symfony 6 will come soon (branch 4.0).
This repository has been initialy created to remove the deprecated warnings on Symfony 4.2 since several pull requests were not reviewed on FriendsOfSymfony/FOSOAuthServerBundle.
It is actively maintained and works on Symfony 5 (branch 3.0) and Symfony 6 (branch 4.0).

Feel free to PR.

Expand All @@ -26,7 +26,9 @@ This bundle is under the MIT license. See the complete license in the bundle:

## TODO

- More tests
Even if this bundle works perfectly in my professionnal application, I would like to :
- bring back Travis CI to green
- make phpunit tests works again


## Credits
Expand Down
3 changes: 2 additions & 1 deletion Security/Authenticator/Oauth2Authenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use Symfony\Component\Security\Core\User\UserCheckerInterface;
use Symfony\Component\Security\Http\Authenticator\AbstractAuthenticator;
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;

Expand Down Expand Up @@ -60,7 +61,7 @@ public function supports(Request $request): ?bool
/**
* {@inheritDoc}
*/
public function authenticate(Request $request): PassportInterface
public function authenticate(Request $request): Passport
{
try {
$tokenString = str_replace('Bearer ', '', $request->headers->get('Authorization'));
Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
}
],
"require": {
"php": "^7.4.25|^8.0",
"php": "^8.0",
"klapaudius/oauth2-php": "~1.4",
"symfony/dependency-injection": "~5.3|~6.0",
"symfony/framework-bundle": "~5.3|~6.0",
"symfony/security-bundle": "~5.3|~6.0",
"symfony/twig-bundle": "~5.3|~6.0"
"symfony/dependency-injection": "~6.0",
"symfony/framework-bundle": "~6.0",
"symfony/security-bundle": "~6.0",
"symfony/twig-bundle": "~6.0"
},
"require-dev": {
"doctrine/doctrine-bundle": "~2.0",
Expand All @@ -37,11 +37,11 @@
"phpstan/phpstan-phpunit": "^0.12.20",
"phpunit/phpunit": "~6.0|~8.0",
"symfony/class-loader": "^2.0",
"symfony/console": "^5.3",
"symfony/form": "^5.3",
"symfony/phpunit-bridge": "^5.3",
"symfony/templating": "^5.3",
"symfony/yaml": "^5.3"
"symfony/console": "~6.0",
"symfony/form": "~6.0",
"symfony/phpunit-bridge": "~6.0",
"symfony/templating": "~6.0",
"symfony/yaml": "~6.0"
},
"suggest": {
"doctrine/doctrine-bundle": "*",
Expand Down

0 comments on commit 7ce8810

Please sign in to comment.