Skip to content

Commit

Permalink
[ft156874253] Fix Flake8 error
Browse files Browse the repository at this point in the history
  • Loading branch information
Joyce Namuli committed Jun 12, 2018
1 parent 1c48e49 commit bde4989
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions helpers/auth/token_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@


class Authentication:
""" Authenicate token and all role based authorization
""" Authenicate token
:methods
verify
decode_token
user_roles
auth_required
get_token
"""

def get_token(self):
token = request.headers.get('token')
token = request.headers.get('token') # get token from headers
return token

def decode_token(self):
Expand All @@ -32,7 +30,7 @@ def decode_token(self):
'message': 'Signature expired. Please log in again.'}), 401
except jwt.InvalidTokenError:
return jsonify({
'message': 'Invalid token. Please Provied a valid token!'
'message': 'Invalid token. Please Provide a valid token!'
}), 401


Expand Down

0 comments on commit bde4989

Please sign in to comment.