bugfix
This commit is contained in:
parent
cdff11dd2b
commit
c36b7f9400
@ -55,12 +55,12 @@ where a.userid = b.id
|
|||||||
return rec
|
return rec
|
||||||
|
|
||||||
async def bearer_auth(sor, request):
|
async def bearer_auth(sor, request):
|
||||||
auth = request.headers.get('Authentication')
|
auth = request.headers.get('Authorization')
|
||||||
if auth is None:
|
if auth is None:
|
||||||
debug(f'headers has not "Authentication"')
|
debug(f'headers has not "Authorization"')
|
||||||
return None
|
return None
|
||||||
if not auth.startswith('Bearer '):
|
if not auth.startswith('Bearer '):
|
||||||
debug(f'"Authentication" not starts with "Bearer "')
|
debug(f'"Authorization" not starts with "Bearer "')
|
||||||
return None
|
return None
|
||||||
apikey = auth[7:]
|
apikey = auth[7:]
|
||||||
client_ip = request['client_ip']
|
client_ip = request['client_ip']
|
||||||
@ -75,7 +75,7 @@ async def apikey_user(sor, apikey, client_ip):
|
|||||||
return user.id
|
return user.id
|
||||||
|
|
||||||
async def deerer_auth(sor, request):
|
async def deerer_auth(sor, request):
|
||||||
auth = request.headers.get('Authentication')
|
auth = request.headers.get('Authorization')
|
||||||
if auth is None:
|
if auth is None:
|
||||||
return None
|
return None
|
||||||
if not auth.startswith('Deerer '):
|
if not auth.startswith('Deerer '):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user