Skip to content

Migrate to Mezzio #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .phpcs-cache

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":1,"defects":[],"times":{"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\ConfigProviderTest::testInvocationReturnsArray":0.003,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\ConfigProviderTest::testReturnedArrayContainsDependencies":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\Debug\\DebugProviderMiddlewareFactoryTest::testProducesMiddlewareWithoutPathTemplateConfig":0.018,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\Debug\\DebugProviderMiddlewareFactoryTest::testProducesMiddlewareWithConfiguredCallbackPathTemplate":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\Debug\\DebugProviderMiddlewareTest::testUsesDefaultValuesToProduceRedirectResponse":0.005,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\Debug\\DebugProviderMiddlewareTest::testWillUsesPathTemplateProvidedInConstructorToProduceRedirectResponse":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\Debug\\DebugProviderTest::testDefaultState":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\Debug\\DebugProviderTest::testAllowsProvidingAuthorizationUrlViaConstructor":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterFactoryTest::testServiceFactoryProducesAdapter":0.002,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testAuthenticateReturnsUserDiscoveredInSession":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testErrorsProvidedByOAuth2ProviderAreRaisedAsAnException":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testReturnsNullForMissingProviderTypeRequestAttribute":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testReturnsNullAndUpdatesSessionWhenRequestingAuthorization with data set \"empty\"":0.003,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testReturnsNullAndUpdatesSessionWhenRequestingAuthorization with data set \"with-redirect\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testCodeReturnedWithInvalidOAuth2StateResultsInUnauthorizedResult with data set \"empty-empty\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testCodeReturnedWithInvalidOAuth2StateResultsInUnauthorizedResult with data set \"state-empty\"":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testCodeReturnedWithInvalidOAuth2StateResultsInUnauthorizedResult with data set \"state-state\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testExceptionWhenRetrievingAccessTokenRaisesNewException":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testExceptionWhenRetrievingResourceOwnerRaisesNewException":0.002,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testSuccessfulProviderAuthorizationSetsUserDataInSession with data set \"github-no-redirect\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testSuccessfulProviderAuthorizationSetsUserDataInSession with data set \"google-no-redirect\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testSuccessfulProviderAuthorizationSetsUserDataInSession with data set \"instagram-no-redirect\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testSuccessfulProviderAuthorizationSetsUserDataInSession with data set \"debug-no-redirect\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testSuccessfulProviderAuthorizationSetsUserDataInSession with data set \"github-redirect\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testSuccessfulProviderAuthorizationSetsUserDataInSession with data set \"google-redirect\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testSuccessfulProviderAuthorizationSetsUserDataInSession with data set \"instagram-redirect\"":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testSuccessfulProviderAuthorizationSetsUserDataInSession with data set \"debug-redirect\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testSuccessfulAuthorizationResultsInRedirectToSessionRedirectValue":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testRequestForAuthorizationResultsInRedirectToProviderAuthorizationUrl":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2AdapterTest::testUnsuccesfulOrIncompleteAuthenticationResultsInUnauthorizedResponse":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2CallbackMiddlewareFactoryTest::testServiceFactoryProducesPipelineWithNoConfigPresent":0.007,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2CallbackMiddlewareFactoryTest::testServiceFactoryProducesPipelineWithNoDebugFlagInConfig":0.002,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2CallbackMiddlewareFactoryTest::testServiceFactoryProducesPipelineWithDebugCallbackRouteWhenDebugFlagEnabled":0.002,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2CallbackMiddlewareFactoryTest::testServiceFactoryCanUseProductionRouteProvidedViaConfiguration":0.002,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2CallbackMiddlewareFactoryTest::testServiceFactoryCanUseDebugRouteProvidedViaConfiguration":0.002,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2CallbackMiddlewareFactoryTest::testServiceFactoryCanUseDebugAuthorizationRouteProvidedViaConfiguration":0.002,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2ProviderFactoryFactoryTest::testServiceFactoryProducesExpectedFactory":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2ProviderFactoryTest::testFactoryRaisesExceptionIfConfigurationNotFoundForProvider with data set \"empty\"":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2ProviderFactoryTest::testFactoryRaisesExceptionIfConfigurationNotFoundForProvider with data set \"missing-provider\"":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2ProviderFactoryTest::testFactoryRaisesExceptionIfConfigurationNotFoundForProvider with data set \"missing-provider-key\"":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2ProviderFactoryTest::testFactoryReturnsOAuth2ClientProviderWithValidConfiguration with data set \"debug\"":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2ProviderFactoryTest::testFactoryReturnsOAuth2ClientProviderWithValidConfiguration with data set \"github\"":0.006,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2ProviderFactoryTest::testFactoryReturnsOAuth2ClientProviderWithValidConfiguration with data set \"google\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\OAuth2ProviderFactoryTest::testFactoryReturnsOAuth2ClientProviderWithValidConfiguration with data set \"custom\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\RedirectResponseFactoryTest::testServiceFactoryReturnsCallable":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\RedirectResponseFactoryTest::testResponseFactoryReturns302ResponseWithLocationBasedOnUrlArgument":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\UnauthorizedResponseFactoryTest::testServiceFactoryReturnsCallable":0,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\UnauthorizedResponseFactoryTest::testResponseFactoryReturns302ResponseWithLocationBasedOnUrlArgument with data set \"no-config\"":0.003,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\UnauthorizedResponseFactoryTest::testResponseFactoryReturns302ResponseWithLocationBasedOnUrlArgument with data set \"no-debug\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\UnauthorizedResponseFactoryTest::testResponseFactoryReturns302ResponseWithLocationBasedOnUrlArgument with data set \"debug-false\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\UnauthorizedResponseFactoryTest::testResponseFactoryReturns302ResponseWithLocationBasedOnUrlArgument with data set \"debug-true\"":0.001,"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\UnauthorizedResponseFactoryTest::testResponseFactoryReturns302ResponseWithLocationBasedOnUrlArgument with data set \"auth-path\"":0.001}}
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# phly-expressive-oauth2clientauthentication
# phly-mezzio-oauth2clientauthentication

[![Build Status](https://secure.travis-ci.org/phly/phly-expressive-oauth2clientauthentication.svg?branch=master)](https://secure.travis-ci.org/phly/phly-expressive-oauth2clientauthentication)
[![Coverage Status](https://coveralls.io/repos/github/phly/phly-expressive-oauth2clientauthentication/badge.svg?branch=master)](https://coveralls.io/github/phly/phly-expressive-oauth2clientauthentication?branch=master)
[![Build Status](https://secure.travis-ci.org/phly/phly-mezzio-oauth2clientauthentication.svg?branch=master)](https://secure.travis-ci.org/phly/phly-mezzio-oauth2clientauthentication)
[![Coverage Status](https://coveralls.io/repos/github/phly/phly-mezzio-oauth2clientauthentication/badge.svg?branch=master)](https://coveralls.io/github/phly/phly-mezzio-oauth2clientauthentication?branch=master)

This library provides a [league/oauth2-client](http://oauth2-client.thephpleague.com)
adapter for use with [zend-expressive-authentication](https://docs.zendframework.com/zend-expressive-authentication).
adapter for use with [mezzio-authentication](https://docs.mezzio.dev/mezzio-authentication).

## Installation

Run the following to install this library:

```bash
$ composer require phly/phly-expressive-oauth2clientauthentication
$ composer require phly/phly-mezzio-oauth2clientauthentication
```

You will also need to install one or more of the OAuth2 providers you wish to
Expand All @@ -29,4 +29,4 @@ Documentation is [in the doc tree](docs/book/), and can be compiled using [mkdoc
$ mkdocs build
```

You may also [browse the documentation online](https://phly.github.io/phly-expressive-oauth2clientauthentication/).
You may also [browse the documentation online](https://phly.github.io/phly-mezzio-oauth2clientauthentication/).
50 changes: 27 additions & 23 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,68 @@
{
"name": "phly/phly-expressive-oauth2clientauthentication",
"description": "league/oauth2-client adapter for zendframework/zend-expressive-authentication",
"name": "phly/phly-mezzio-oauth2clientauthentication",
"description": "league/oauth2-client adapter for mezzio/mezzio-authentication",
"license": "BSD-2-Clause",
"keywords": [
"authentication",
"oauth2",
"expressive",
"mezzio",
"psr-7",
"psr-15"
],
"support": {
"docs": "https://phly.github.io/phly-expressive-oauth2clientauthentication/",
"issues": "https://github.com/phly/phly-expressive-oauth2clientauthentication/issues",
"source": "https://github.com/phly/phly-expressive-oauth2clientauthentication",
"rss": "https://github.com/phly/phly-expressive-oauth2clientauthentication/releases.atom"
"docs": "https://phly.github.io/phly-mezzio-oauth2clientauthentication/",
"issues": "https://github.com/phly/phly-mezzio-oauth2clientauthentication/issues",
"source": "https://github.com/phly/phly-mezzio-oauth2clientauthentication",
"rss": "https://github.com/phly/phly-mezzio-oauth2clientauthentication/releases.atom"
},
"require": {
"php": "^7.1",
"php": "^7.4 || ~8.0.0 || ~8.1.0",
"league/oauth2-client": "^2.2",
"zendframework/zend-expressive": "^3.0",
"zendframework/zend-expressive-authentication": "^1.0",
"zendframework/zend-expressive-session": "^1.0"
"mezzio/mezzio": "^3.0",
"mezzio/mezzio-authentication": "^1.0",
"mezzio/mezzio-session": "^1.0"
},
"require-dev": {
"league/oauth2-github": "^2.0",
"league/oauth2-google": "^2.0",
"league/oauth2-instagram": "^2.0",
"phpunit/phpunit": "^7.0.2",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-expressive-fastroute": "^3.0",
"zendframework/zend-expressive-template": "^2.0"
"laminas/laminas-coding-standard": "^2.3",
"league/oauth2-github": "^3.0",
"league/oauth2-google": "^4.0",
"league/oauth2-instagram": "^3.1.0",
"mezzio/mezzio-fastroute": "^3.0",
"mezzio/mezzio-template": "^2.0",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.5.11"
},
"suggest": {
"league/oauth2-facebook": "To use the Facebook OAuth2 provider",
"league/oauth2-github": "To use the GitHub OAuth2 provider",
"league/oauth2-google": "To use the Google OAuth2 provider",
"league/oauth2-instagram": "To use the Instagram OAuth2 provider",
"league/oauth2-linkedin": "To use the LinkedIn OAuth2 provider",
"zendframework/zend-expressive-template": "To use the shipped UnauthorizedResponseFactory, which includes template support"
"mezzio/mezzio-template": "To use the shipped UnauthorizedResponseFactory, which includes template support"
},
"autoload": {
"psr-4": {
"Phly\\Expressive\\OAuth2ClientAuthentication\\": "src/"
"Phly\\Mezzio\\OAuth2ClientAuthentication\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"PhlyTest\\Expressive\\OAuth2ClientAuthentication\\": "test/"
"PhlyTest\\Mezzio\\OAuth2ClientAuthentication\\": "test/"
}
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev",
"dev-develop": "1.1.x-dev"
},
"zf": {
"config-provider": "Phly\\Expressive\\OAuth2ClientAuthentication\\ConfigProvider"
"config-provider": "Phly\\Mezzio\\OAuth2ClientAuthentication\\ConfigProvider"
}
},
"scripts": {
Expand Down
Loading