We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Based on the RFC https://www.rfc-editor.org/rfc/rfc6750 an expired bearer token should return 401 not 400
private/Authentication.ps1 line 429
if ($options.AsJWT) { try { $payload = ConvertFrom-PodeJwt -Token $token -Secret $options.Secret Test-PodeJwt -Payload $payload } catch { if ($_.Exception.Message -ilike '*jwt*') { return @{ Message = $_.Exception.Message Code = 400 } } throw } $result = @($payload) }
should be changed to
if ($options.AsJWT) { try { $payload = ConvertFrom-PodeJwt -Token $token -Secret $options.Secret Test-PodeJwt -Payload $payload } catch { if ($_.Exception.Message -ilike '*jwt*') { return @{ Message = $_.Exception.Message #https://www.rfc-editor.org/rfc/rfc6750 Bearer token should return 401 Challenge = (New-PodeAuthBearerChallenge -Scopes $options.Scopes -ErrorType invalid_token) Code = 401 } } throw } $result = @($payload) }
The text was updated successfully, but these errors were encountered:
It's fixed on my fork
Sorry, something went wrong.
No branches or pull requests
Based on the RFC https://www.rfc-editor.org/rfc/rfc6750 an expired bearer token should return 401 not 400
private/Authentication.ps1
line 429
should be changed to
The text was updated successfully, but these errors were encountered: