Exemplo n.º 1
0
Arquivo: routes.py Projeto: brownac/ow
def get_player(tag):
    key = app.config['SECRET_KEY']
    token = request.headers['Authorization'].split('Bearer ')[1]
    if token is None or check_token(token, key) is False or verify_token(
            token, key) is False:
        return "Not authorized", 403
    return get_individual_info(fetch_player_by_tag(tag))
Exemplo n.º 2
0
 def checkCookie(self, cookie):
     if not cookie:
         return
     (username, token) = cookie.rsplit("#", 1)
     if auth.check_token(username, token):
         self.setPerson(username, token)
Exemplo n.º 3
0
 def rpc_check_token(self, username, token):
     return auth.check_token(username, token)
Exemplo n.º 4
0
 def rpc_check_token(self, username, token):
     return auth.check_token(username, token)
Exemplo n.º 5
0
 def checkCookie(self, cookie):
     if not cookie:
         return
     (username, token) = cookie.rsplit("#", 1)
     if auth.check_token(username, token):
         self.setPerson(username, token)
Exemplo n.º 6
0
 def rpc_check_token(self, user, token):
     #return 'You said: %s' % s
     return auth.check_token(user, token)