wip middleware
This commit is contained in:
@@ -80,6 +80,19 @@ class Authorizer:
|
||||
|
||||
|
||||
def _authorizer(bearer: BearerToken) -> Authorizer:
|
||||
"""
|
||||
Build an Authorizer object based on the bearer token's auth type.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
bearer : BearerToken
|
||||
The bearer token containing authentication information.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Authorizer
|
||||
An Authorizer object with the appropriate authorization status and context.
|
||||
"""
|
||||
try:
|
||||
match bearer.auth_type:
|
||||
case TokenType.USER_TOKEN:
|
||||
|
||||
Reference in New Issue
Block a user