mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
POST /cognito-idp/oauth2/revoke, and /oauth2/revoke on a custom domain, revoke a refresh token through RevokeToken and answer as AWS's revocation endpoint does, as measured: 200 with no body for a revoked, already revoked or invalid token; 400 invalid_request for a missing token or a client with revocation disabled; 400 unsupported_token_type for an access or ID token; and 401 invalid_client with WWW-Authenticate: Basic for missing or bad client credentials, a client of another pool, or a token issued to another client. Unlike the token endpoint, a client secret is taken only from the Basic header. On a custom domain, the Cognito filter now answers a path under /oauth2/ that Cognito does not serve with AWS's JSON 404, and a served path called with another method with an empty 405, so neither reaches S3 as a key of a bucket named cognito-idp.