zend-expressive-authentication icon indicating copy to clipboard operation
zend-expressive-authentication copied to clipboard

Throw exception when query does not work

Open Colmbus72 opened this issue 6 years ago • 2 comments
trafficstars

Throw an exception when we find out that execute() did not work. Since execute() returns false when there is an error we can bubble this up to let the user know their auth roles or auth details query from the config was incorrect.

Provide a narrative description of what you are trying to accomplish:

  • [x] Are you fixing a bug?
    • [x] Detail how the bug is invoked currently. If the user puts an incorrect sql query in their auth config it will role over this without telling them it was wrong.
    • [x] Detail the original, incorrect behavior. If an incorrect sql query is used in the auth config it will show every user has possibly no role or no details
    • [x] Detail the new, expected behavior. When an incorrect sql query is passed in the config and ran against the db a runtime exception will be thrown showing the details return from errorInfo() on the prepared statement.
    • [x] Base your feature on the master branch, and submit against that branch.

Colmbus72 avatar Oct 28 '19 18:10 Colmbus72

This repository has been closed and moved to mezzio/mezzio-authentication; a new issue has been opened at https://github.com/mezzio/mezzio-authentication/issues/1.

weierophinney avatar Dec 31 '19 20:12 weierophinney

This repository has been moved to mezzio/mezzio-authentication. 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 mezzio/mezzio-authentication to another directory.
  • Copy the files from the second bullet point to the clone of mezzio/mezzio-authentication.
  • In your clone of mezzio/mezzio-authentication, 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.

weierophinney avatar Dec 31 '19 20:12 weierophinney