🚨(linter) add missing docstrings
Title says all there is to say…
This commit is contained in:
committed by
Laurent Bossavit
parent
3934a0bc28
commit
1d1f5cfbb6
@@ -0,0 +1 @@
|
||||
"""Backend resource server module."""
|
||||
|
||||
@@ -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.
|
||||
"""
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user