use async error handlers in auth module (Fixes #298)

This commit is contained in:
Miguel Grinberg
2025-05-08 20:07:16 +01:00
parent 7c42a18436
commit d9d7ff0825

View File

@@ -85,7 +85,7 @@ class BasicAuth(BaseAuth):
return None
return username, password
def authentication_error(self, request):
async def authentication_error(self, request):
return '', self.error_status, {
'WWW-Authenticate': '{} realm="{}", charset="{}"'.format(
self.scheme, self.realm, self.charset)}
@@ -158,5 +158,5 @@ class TokenAuth(BaseAuth):
"""
self.error_callback = f
def authentication_error(self, request):
async def authentication_error(self, request):
abort(self.error_status)