payprop / net-oauth2-authorizationserver

Module to implement core functions of an OAuth2 authorization server
7 stars 10 forks source link

avoid returning from a Try::Tiny callback #21

Closed dylanwh closed 5 years ago

dylanwh commented 5 years ago

Calling return from inside a try or catch block will not return from the function the try-catch is used. This is a common pitfall when using Try::Tiny.

This fixes the issue raised in #20

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.2%) to 97.665% when pulling 4173fda097a5d7f1bb2232fcb2f5f8a3ca00063e on dylanwh:master into 2fad69ba86e0a502b9348451d1a1d9f84760f80c on Humanstate:master.

leejo commented 5 years ago

Merged, ta! Will get this out shortly.

leejo commented 5 years ago

OK, this looks like it never mattered because Mojo::JWT->decode was returning no claims payload with an invalid JWT and the following if block returned the same thing due to there being no auth_code_payload