🚨(linter) add missing docstrings

Title says all there is to say…
This commit is contained in:
Laurent Bossavit
2024-10-25 14:59:02 +02:00
committed by Laurent Bossavit
parent 3934a0bc28
commit 1d1f5cfbb6
32 changed files with 38 additions and 4 deletions

View File

@@ -0,0 +1 @@
"""Backend resource server module."""

View File

@@ -19,6 +19,7 @@ class ResourceServerAuthentication(OIDCAuthentication):
"""Authenticate clients using the token received from the authorization server."""
def __init__(self):
"""Require authentication to be configured in order to instantiate."""
super().__init__()
try:
@@ -40,7 +41,7 @@ class ResourceServerAuthentication(OIDCAuthentication):
def get_access_token(self, request):
"""Retrieve and decode the access token from the request.
This method overcharges the 'get_access_token' method from the parent class,
This method overrides the 'get_access_token' method from the parent class,
to support service providers that would base64 encode the bearer token.
"""

View File

@@ -33,6 +33,7 @@ class ResourceServerBackend:
# pylint: disable=too-many-instance-attributes
def __init__(self, authorization_server_client):
"""Require client_id, client_secret set and authorization_server_client provided."""
# pylint: disable=invalid-name
self.UserModel = auth.get_user_model()

View File

@@ -31,6 +31,8 @@ class AuthorizationServerClient:
timeout,
proxy,
):
"""Require at a minimum url, url_jwks and url_introspection."""
if not url or not url_jwks or not url_introspection:
raise ImproperlyConfigured(
"Could not instantiate AuthorizationServerClient, some parameters are missing."