overture-stack / ego

OAuth 2.0 authorization service that supports multiple OpenID identity providers
https://www.overture.bio/products/ego
GNU Affero General Public License v3.0
26 stars 14 forks source link

Changes related to error status 400 and updates to deletion of visa #710

Closed Azher2Ali closed 1 year ago

Azher2Ali commented 1 year ago

As mentioned in the earlier ticker #708 ,The issues related to API's returning HTTP 400 error status has now been fixed. With the recent changes, if any user does not authenticated with valid jwt the error code returns back as HTTP 401 (Unauthorized) with a error status { "error": "Unauthorized", "message": "Required request header 'Authorization' for method parameter type String is not present", "timestamp": "2023-06-01T16:00:02.624+0000", "path": "/visa" }

Steps to reproduce:

  1. Go to 'http://localhost:8081/swagger-ui/index.html#/Visa/deleteVisa'
  2. Do not provide any api key in "Authorize" tab.
  3. Test any api within ego
  4. Response returned is HTTP 400 Bad Request

Below is the ss, displaying the error status

Screenshot 2023-06-01 at 1 20 09 PM

The second change is regarding the updates to deletion of visa. Earlier, there was an option to delete the Visa with using VisaId as a parameter. Now, as we are no longer using the VisaId to fetch or update. Therefore, "type" and "value" can be used to delete the Visa now.