Skip to content

Commit

Permalink
OAuth revoke hint
Browse files Browse the repository at this point in the history
  • Loading branch information
na-stewart committed Jan 15, 2025
1 parent 93fea40 commit 8388211
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "sanic-security"
version = "1.16.6"
version = "1.16.7"
requires-python = ">=3.8"
dependencies = [
"tortoise-orm>=0.17.0",
Expand Down
2 changes: 1 addition & 1 deletion sanic_security/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async def check_roles(request: Request, *required_roles: str) -> AuthenticationS
async def assign_role(
name: str,
account: Account,
description: str = None,
description: str,
*permissions: str,
) -> Role:
"""
Expand Down
2 changes: 1 addition & 1 deletion sanic_security/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ 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"))
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 8388211

Please sign in to comment.