Add scope ordinality and translations. Process oauth tokens and limit scopes accordingly.
This commit is contained in:
parent
25ceb90fc6
commit
e74eb3ee87
8 changed files with 137 additions and 31 deletions
|
@ -20,7 +20,7 @@ from auth import scopes
|
|||
logger = logging.getLogger(__name__)
|
||||
api_bp = Blueprint('api', __name__)
|
||||
api = Api(api_bp)
|
||||
api.decorators = [crossdomain(origin='*')]
|
||||
api.decorators = [crossdomain(origin='*', headers=['Authorization'])]
|
||||
|
||||
|
||||
def resource(*urls, **kwargs):
|
||||
|
@ -97,7 +97,12 @@ def parse_repository_name(func):
|
|||
return wrapper
|
||||
|
||||
|
||||
class RepositoryParamResource(Resource):
|
||||
class ApiResource(Resource):
|
||||
def options(self):
|
||||
return None, 200
|
||||
|
||||
|
||||
class RepositoryParamResource(ApiResource):
|
||||
method_decorators = [parse_repository_name]
|
||||
|
||||
|
||||
|
|
Reference in a new issue