Change Tokens to ApiKey

Added name to ApiKey model
This commit is contained in:
Rebecca Law
2016-01-19 12:07:00 +00:00
parent 6966c2484f
commit 4fc5c34320
14 changed files with 281 additions and 226 deletions

View File

@@ -2,7 +2,7 @@ from flask import request, jsonify, _request_ctx_stack
from client.authentication import decode_jwt_token, get_token_issuer
from client.errors import TokenDecodeError, TokenRequestError, TokenExpiredError, TokenPayloadError
from app.dao.tokens_dao import get_unsigned_token
from app.dao.api_key_dao import get_unsigned_secret
def authentication_response(message, code):
@@ -49,5 +49,5 @@ def requires_auth():
def fetch_client(client):
return {
"client": client,
"secret": get_unsigned_token(client)
"secret": get_unsigned_secret(client)
}