Returns the current user parameters. The current user is linked to the secret token

        :return: a list with the current user properties
973509
def currentuser(self):
        
        request = requests.get(
            '{0}/api/v3/user'.format(self.host),
            headers=self.headers, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        return request.json()
115342
def user(self):
        
        if self.api and self.user_id:
            return self.api._get_user(self.user_id)
708825
def get_params(self):
        
        param_names = ['aws_access_key_id', 'aws_secret_access_key',
                       'is_secure', 'port', 'proxy', 'proxy_port',
                       'proxy_user', 'proxy_pass',
                       'debug', 'https_connection_factory']
        params = {}
        for name in param_names:
            params[name] = getattr(self, name)
        return params
742395
def get_user_token(self):
        
        headers = { 'User-Agent': self.user_agent(),
                'Host': self.domain(),
                'Accept': '*/*',
        }
        headers.update(self.headers())
        r = requests.get(   self.portals_url()+'/users/_this/token',
                            headers=headers,
                            auth=self.auth())
        if HTTP_STATUS.OK == r.status_code:
            return r.text
        else:
            print("get_user_token: Something went wrong: <{0}>: {1}".format(
                        r.status_code, r.reason))
            r.raise_for_status()
131001
def creds(self):
        
        session = self.client.session()
        if session is None:
            return None

        return {
            "basic_auth": self.client.basic_auth_str(),
            "user_ctx": session.get('userCtx')
        }
67645
def getall(self):
        
        users = self.users_re.findall(self.config, re.M)
        resources = dict()
        for user in users:
            resources.update(self._parse_username(user))
        return resources
276380
def get_current_user():
    """"""
    thread_local = AutomatedLoggingMiddleware.thread_local
    if hasattr(thread_local, 'current_user'):
        user = thread_local.current_user
        if isinstance(user, AnonymousUser):
            user = None
    else:
        user = None

    return user
1374040
def _proxy_parameters(self):
        

        proxy_protocol = ''
        if self.proxy_host.startswith('https'):
            proxy_protocol = 'https'
        else:
            proxy_protocol = 'http'

        proxy = '{0}://'.format(proxy_protocol)
        if self.proxy_username and self.proxy_password:
            proxy += '{0}:{1}@'.format(self.proxy_username, self.proxy_password)

        proxy += sub(r'https?(://)?', '', self.proxy_host)

        if self.proxy_port:
            proxy += ':{0}'.format(self.proxy_port)

        return {
            'http': proxy,
            'https': proxy
        }
1328014
def get_users(self, **kwargs):
        
        return GetUsers(settings=self.settings, **kwargs).call(**kwargs)
107164
def getUser(self):
        
        username = self.getUsername()
        if not username:
            return None
        user = api.user.get(userid=username)
        return user
1269569
def get_security_token!(parameters = {})
      username = parameters[:username] || @options.username
      password = parameters[:password] || @options.password
      appname = parameters[:appname] || @options.appname

      request_data = {
        'Username' => username,
        'Password' => password,
        'Appname' => appname
      }

      start_timer
      response = @connection.post(build_uri('GetToken'), MultiJson.dump(request_data.to_hash))
      end_timer

      log_get_security_token
      log_info("Response Status: #{response.status}")

      if response.status != 200
        raise make_get_security_token_error
      else
        raise_if_response_error(response)

        @security_token = response.body
      end
    end
1269533
def _get_user(self) -> Dict:
        

        if 'callback_query' in self._update:
            return self._update['callback_query']['from']
        elif 'inline_query' in self._update:
            return self._update['inline_query']['from']
        elif 'message' in self._update:
            return self._update['message']['from']
618184
def current_access(self):
        
        return self.access_for(actor=current_auth.actor, anchors=current_auth.anchors)
147661
def _retrieve_users(self):
        
        users_url = self._build_url('users')
        response = self._request('GET', users_url)
        users = response.json()
        return users
1199165
def users(self):
        
        if not hasattr(self, "_users"):
            us = {}
            if "users" in self.doc:
                for ur in self.doc["users"]:
                    us[ur["name"]] = u = copy.deepcopy(ur["user"])
                    BytesOrFile.maybe_set(u, "client-certificate")
                    BytesOrFile.maybe_set(u, "client-key")
            self._users = us
        return self._users
539640
def current_user():
    
    user_id = current_user_id()
    guard = current_guard()
    user = guard.user_class.identify(user_id)
    PraetorianError.require_condition(
        user is not None,
        "Could not identify the current user from the current id",
    )
    return user
1244100
def get_current_user(self):
        
        from google.appengine.api import users

        if _IS_DEVELOPMENT_SERVER:
            return users.get_current_user()
        else:
            from google.appengine.api import oauth

            try:
                user = oauth.get_current_user()
            except oauth.OAuthRequestError:
                user = users.get_current_user()
            return user