interledger / rafiki

An open-source, comprehensive Interledger service for wallet providers, enabling them to provide Interledger functionality to their users.
https://rafiki.dev/
Apache License 2.0
262 stars 88 forks source link

Authorization Server should throw a `GNAPServerRouteError` if invalid token is used during rotation #3100

Closed njlie closed 2 days ago

njlie commented 1 week ago

The following conditional in the access token routes file does not throw a GNAPServerError like the rest of the errors in that route logic.

https://github.com/interledger/rafiki/blob/be426fad6457d9928f3151cedf1401bf6b1cf65a/packages/auth/src/accessToken/routes.ts#L155-L157

It should throw a 404 http code and a invalid_rotation GNAP error code.