The client constructs the request by including the following parameters using the "application/x-www-form-urlencoded" format in the HTTP request entity-body: token REQUIRED. The token that the client wants to get revoked. token_type_hint OPT
(self, request, client)
| 15 | ENDPOINT_NAME = "revocation" |
| 16 | |
| 17 | def authenticate_token(self, request, client): |
| 18 | """The client constructs the request by including the following |
| 19 | parameters using the "application/x-www-form-urlencoded" format in |
| 20 | the HTTP request entity-body: |
| 21 | |
| 22 | token |
| 23 | REQUIRED. The token that the client wants to get revoked. |
| 24 | |
| 25 | token_type_hint |
| 26 | OPTIONAL. A hint about the type of the token submitted for |
| 27 | revocation. |
| 28 | """ |
| 29 | self.check_params(request, client) |
| 30 | token = self.query_token( |
| 31 | request.form["token"], request.form.get("token_type_hint") |
| 32 | ) |
| 33 | if token and not token.check_client(client): |
| 34 | raise InvalidGrantError() |
| 35 | return token |
| 36 | |
| 37 | def check_params(self, request, client): |
| 38 | if "token" not in request.form: |
no test coverage detected