doorkeeper-gem / doorkeeper

Doorkeeper is an OAuth 2 provider for Ruby on Rails / Grape.
https://doorkeeper.gitbook.io/guides/
MIT License
5.34k stars 1.07k forks source link

Add Pragma: no-cache to token response #1712

Closed ransombriggs closed 4 months ago

ransombriggs commented 4 months ago

Summary

According to the spec we should be returning a Pragma header in the token response.

The authorization server MUST include the HTTP "Cache-Control" response header field [RFC2616] with a value of "no-store" in any response containing tokens, credentials, or other sensitive information, as well as the "Pragma" response header field [RFC2616] with a value of "no-cache".

When I was doing a review of our implementation I found that the Pragma header is missing so adding it to be compliant.