what if api secret auth actually… did the right thing? just kidding… unless
This commit is contained in:
parent
f9e5af937e
commit
da4631b715
1 changed files with 1 additions and 2 deletions
|
@ -38,8 +38,7 @@ class BearerAuth(HttpBearer):
|
||||||
).select_related("user").get()
|
).select_related("user").get()
|
||||||
except UserPermissions.DoesNotExist:
|
except UserPermissions.DoesNotExist:
|
||||||
raise APITokenInvalid
|
raise APITokenInvalid
|
||||||
session = self.SessionStore(token.removeprefix("secret:"))
|
return user_perms.user
|
||||||
return session.user
|
|
||||||
# todo: implement token (app) auth
|
# todo: implement token (app) auth
|
||||||
raise APITokenInvalid
|
raise APITokenInvalid
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue