Skip to content

Conversation

@nsafwan
Copy link

@nsafwan nsafwan commented Jul 29, 2024

Description

Allows users without an authentication token to access the raw data API. Migrating the dw_descripter to the Rest stack through the route /rest/v1/warehouse/search/dw_descripter. Added new test cases for the new dw_descripter endpoint and modifying the test for the raw data endpoint to now pass for requests with empty token in accordance to the modifications.

Two new exception classes were added for token authentication:

  • classes/Rest/Exceptions/BadTokenException.php
  • classes/Rest/Exceptions/EmptyTokenException.php

Motivation and Context

Since the raw data endpoint is used for the data catalog, this would allow for public/non logged in users to view the entries available to them without a token. Migrating the dw_descripter endpoint allows for this same behavior and places it in the same place as the rest of the API functionality. Adding the new exception classes separates UnauthorizedHttpException for more nuanced behavior depending on empty or invalid token.

Tests performed

Automated tests. Modified tests to test for the changed functionality and added new test for the migrated endpoint.

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

@eiffel777 eiffel777 added enhancement Enhancement of the functionality of an existing feature Category:General General labels Jul 29, 2024
@eiffel777 eiffel777 added this to the 11.5.0 milestone Jul 29, 2024
Copy link
Contributor

@ryanrath ryanrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few

Copy link
Author

@nsafwan nsafwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing 'r' and snake_case for want_public_user have been fixed. And yes, that check is failing because of pulled code from get_dw_descripter.php.

@nsafwan nsafwan requested a review from ryanrath July 29, 2024 19:44
@eiffel777 eiffel777 marked this pull request as draft October 28, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category:General General enhancement Enhancement of the functionality of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants