Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

[WIP] Composite auth adapter #76

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

stefanotorresi
Copy link
Contributor

As originally proposed in #65

This PR adds the possibility to use multiple authentication adapters under the same type.

It also introduces an AdapterAbstractFactory that allows to retrieve each adapter from the ServiceManager under the naming convention zf-mvc-auth-authentication-adapters-{type}.
This enables a new method to register custom adapters: using a service name the adapter key of a named adapter configuration.

TO-DO:

  • Provide a way to use the composite adapter as a default one for all APIs
  • Integration Tests
  • Update the README

@weierophinney
Copy link
Member

@stefanotorresi This looks fantastic! Any chance you can wrap up the lingering todo items soonish?

@stefanotorresi
Copy link
Contributor Author

@weierophinney been a bit busy lately, but I'll try to attend to this before the end of this week!

@weierophinney
Copy link
Member

@stefanotorresi I pulled this locally, rebased it off of current develop, and tried to push to your branch... but could not. So I did a PR for you: stefanotorresi#1

The tasks you have listed above are still incomplete, and, honestly, I'm unsure how to complete the first 2. If you would like to continue with this patch, please merge the PR I sent you, and push changes back to your branch when complete.

Thanks!

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools-mvc-auth; a new issue has been opened at laminas-api-tools/api-tools-mvc-auth#17.

@weierophinney
Copy link
Member

This repository has been moved to laminas-api-tools/api-tools-mvc-auth. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone laminas-api-tools/api-tools-mvc-auth to another directory.
  • Copy the files from the second bullet point to the clone of laminas-api-tools/api-tools-mvc-auth.
  • In your clone of laminas-api-tools/api-tools-mvc-auth, commit the files, push to your fork, and open the new PR.
    We will be providing tooling via laminas/laminas-migration soon to help automate the process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants