Skip to content

Commit

Permalink
Syntax revision
Browse files Browse the repository at this point in the history
  • Loading branch information
na-stewart committed Jan 15, 2025
1 parent 8388211 commit 52ffcc3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sanic_security/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ async def oauth_revoke(request: Request, client: BaseOAuth2) -> dict:
token_info = await oauth_decode(request, client, False)
request.ctx.oauth["revoked"] = True
with suppress(RevokeTokenNotSupportedError):
await client.revoke_token(token_info.get("access_token"), "access_token")
await client.revoke_token(
token_info.get("access_token"), "access_token"
)
return token_info
except RevokeTokenError as e:
raise OAuthError(f"Failed to revoke access token {e.response.text}")
Expand Down

0 comments on commit 52ffcc3

Please sign in to comment.