mirror of
https://github.com/kevin-DL/ShortMe-URL-Shortener.git
synced 2026-01-11 11:04:28 +00:00
13 lines
272 B
Python
13 lines
272 B
Python
from flask_httpauth import HTTPTokenAuth
|
|
|
|
from app.server.db.models import AuthToken
|
|
|
|
auth = HTTPTokenAuth(scheme='Bearer')
|
|
|
|
|
|
@auth.verify_token
|
|
def verify_token(token):
|
|
"""Used to verify user's Token"""
|
|
return AuthToken.query.filter_by(auth_token=token).first()
|
|
|