Fixed bug in validate_token(), it now returns the validation status.

Also separated on-the-fly creation of user in our database into its
own function.
This commit is contained in:
2016-03-04 14:49:48 +01:00
parent 7ca22691eb
commit 172e8a8ba0
3 changed files with 51 additions and 49 deletions

View File

@@ -17,13 +17,11 @@ from eve.io.mongo import Validator
RFC1123_DATE_FORMAT = '%a, %d %b %Y %H:%M:%S GMT'
class NewAuth(TokenAuth):
def check_auth(self, token, allowed_roles, resource, method):
if not token:
return False
else:
validate_token()
return True
return validate_token()
class ValidateCustomFields(Validator):
def convert_properties(self, properties, node_schema):