]> git.koha-community.org Git - koha.git/commit
Bug 24003: Make the API set userenv on authentication
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 5 Jun 2020 12:16:16 +0000 (09:16 -0300)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Sun, 21 Jun 2020 23:54:23 +0000 (11:54 +1200)
commit977130c7ae3c3ee095e5219d88592962c92eeb96
tree32c9bd4b541acb710d5585a3745939c80a131cfa
parentb143cc31fb4f6d3af445a3bb3b93ccb7ad8c4755
Bug 24003: Make the API set userenv on authentication

This patch makes the authentication step stash the user that got
authenticated so code outside the Mojo part of Koha can use it (i.e.
through the use of C4::Context->userenv).

To test:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t \
           t/db_dependent/api/v1/auth_basic.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Koha/REST/V1/Auth.pm