Skip to content

Commit 9a3ca40

Browse files
committed
docstrings
1 parent 0b46fc8 commit 9a3ca40

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

seacatauth/authz/rbac/handler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class RBACHandler(object):
1717
Resource-based access control
1818
1919
---
20-
tags: ["Authorization"]
20+
tags: ["Resources"]
2121
"""
2222

2323
def __init__(self, app, rbac_svc):
@@ -28,9 +28,9 @@ def __init__(self, app, rbac_svc):
2828
web_app.router.add_get("/rbac/{tenant}/{resources}", self.rbac)
2929

3030
@access_control()
31-
async def rbac(self, request, *, tenant):
31+
async def rbac(self, request, *, tenant=None):
3232
"""
33-
Validate the current credentials' access to requested resources
33+
Verify whether the current session is authorized to access requested resources
3434
3535
Multiple resources must be separated by `+`.
3636
"""

seacatauth/openidconnect/handler/token.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ async def token_error_response(self, request, error_description):
271271

272272
async def validate_id_token(self, request):
273273
"""
274-
Read the JWT token either from the request body or from the Authorization header.
274+
Check the validity of a JWToken
275+
276+
Read the JWToken either from the request body or from the Authorization header.
275277
Validate the token: send back the contents if successful; otherwise respond with error.
276278
"""
277279
body = await request.read()

0 commit comments

Comments
 (0)