Skip to main content

never_cached

Function never_cached 

Source
pub(crate) async fn never_cached(request: Request, next: Next) -> Response
Expand description

Marks every answer from POST /oauth/par and POST /oauth/token uncacheable, success and refusal alike.

RFC 6749 ยง5.1 has an authorization server send Cache-Control: no-store and Pragma: no-cache on any response containing tokens, credentials or other sensitive information. The reference provider sends both on every answer from these endpoints, as this does.