Skip to content

Refactor REST API token authentication code to allow for use of existing role-based authorization code. #1743

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

Draft
wants to merge 1 commit into
base: xdmod10.5
Choose a base branch
from

Conversation

aaronweeden
Copy link
Contributor

Description

This refactors the authenticateToken() method in classes/Rest/Controllers/BaseControllerProvider.php so that it sets _USER property of the $request object rather than returning the $user object. This allows for the authorize($request, $requirements) method to be subsequently called.

Motivation and Context

Tests performed

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

so the `authorize()` method can still be applied to it.
@jpwhite4 jpwhite4 added this to the 11.0.0 milestone Jul 18, 2023
@aaronweeden aaronweeden removed this from the 11.0.0 milestone Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants