@classmethod
def get_token(cls, handler):
    """Get the user token from a request

        Default:

        - in URL parameters: ?token=<token>
        - in header: Authorization: token <token>
        """
    user_token = handler.get_argument('token', '')
    if not user_token:
        m = cls.auth_header_pat.match(handler.request.headers.get(
            'Authorization', ''))
        if m:
            user_token = m.group(1)
    return user_token
