List user tokens.
977670
def index():
    """"""
    clients = Client.query.filter_by(
        user_id=current_user.get_id(),
        is_internal=False,
    ).all()

    tokens = Token.query.options(db.joinedload('client')).filter(
        Token.user_id == current_user.get_id(),
        Token.is_personal == True,  # noqa
        Token.is_internal == False,
        Client.is_internal == True,
    ).all()

    authorized_apps = Token.query.options(db.joinedload('client')).filter(
        Token.user_id == current_user.get_id(),
        Token.is_personal == False,  # noqa
        Token.is_internal == False,
        Client.is_internal == False,
    ).all()

    return render_template(
        'invenio_oauth2server/settings/index.html',
        clients=clients,
        tokens=tokens,
        authorized_apps=authorized_apps,
    )
1272643
def construct_user_list(raw_users=None):
        """"""
        users = Users(oktypes=User)
        for user_dict in raw_users:
            public_keys = None
            if user_dict.get('public_keys'):
                public_keys = [PublicKey(b64encoded=x, raw=None)
                               for x in user_dict.get('public_keys')]
            users.append(User(name=user_dict.get('name'),
                              passwd=user_dict.get('passwd'),
                              uid=user_dict.get('uid'),
                              gid=user_dict.get('gid'),
                              home_dir=user_dict.get('home_dir'),
                              gecos=user_dict.get('gecos'),
                              shell=user_dict.get('shell'),
                              public_keys=public_keys,
                              sudoers_entry=user_dict.get('sudoers_entry')))
        return users
882045
def list_users(self):
    '''
    ''' 
    folders = glob('%s/*' %(self.database))
    folders.sort()
    return [self.print_user(x) for x in folders]
566261
def list_customer_users(self, customer_id):
		""""""
		content = self._fetch("/customer/users/%s" % customer_id)
		return map(lambda x: FastlyUser(self, x), content)
495416
def usergroups_list(self, **kwargs) -> SlackResponse:
        """"""
        self._validate_xoxp_token()
        return self.api_call("usergroups.list", http_verb="GET", params=kwargs)
107563
def tokens(self):
        
        if self._tokens is None:
            self._tokens = TokenList(self._version, account_sid=self._solution['sid'], )
        return self._tokens
724307
def get_user_token():
    """"""
    if not hasattr(stack.top, 'current_user'):
        return ''
    current_user = stack.top.current_user
    return current_user.get('token', '')
496079
def tokenize(self, token_list):
    """"""
    return [
        self._vocab_dict.get(token, self._vocab_dict[self.UNK])
        for token in token_list
    ]
454484
def get_tokens_list(self, registry_address: PaymentNetworkID):
        """"""
        tokens_list = views.get_token_identifiers(
            chain_state=views.state_from_raiden(self.raiden),
            payment_network_id=registry_address,
        )
        return tokens_list
1340540
def user_data(self, access_token, *args, **kwargs):
        """"""
        url = '{}/userinfo'.format(self.BASE_URL)
        response = self.get_json(
            url,
            headers={'Authorization': 'Bearer ' + access_token},
        )
        self.check_correct_audience(response['audience'])

        userdata = response['user']
        return userdata
935050
def context_list_users(zap_helper, context_name):
    """"""
    with zap_error_handler():
        info = zap_helper.get_context_info(context_name)

    users = zap_helper.zap.users.users_list(info['id'])
    if len(users):
        user_list = ', '.join([user['name'] for user in users])
        console.info('Available users for the context {0}: {1}'.format(context_name, user_list))
    else:
        console.info('No users configured for the context {}'.format(context_name))
1226522
def user_parse(data):
        """"""
        _user = data.get('oauth', {}).get('user', {})
        yield 'id', _user.get('id')
        yield 'username', _user.get('username')
        first_name, _, last_name = _user.get('display_name').partition(' ')
        yield 'first_name', first_name
        yield 'last_name', last_name
68806
def user_list(self, userid, cur_p=''):
        '''
        
        '''
        current_page_number = int(cur_p) if cur_p else 1
        current_page_number = 1 if current_page_number < 1 else current_page_number

        kwd = {
            'current_page': current_page_number
        }

        recs = MEntity2User.get_all_pager_by_username(userid, current_page_num=current_page_number).objects()

        self.render('misc/entity/entity_user_download.html',
                    imgs=recs,
                    cfg=config.CMS_CFG,
                    kwd=kwd,
                    userinfo=self.userinfo)
2911
def list_tokens(self, request, **kwargs):
        

        # no date checking is done here to make it more obvious if there's an issue with the
        # number of records. Date filtering will be done on the frontend.
        infos = [ObfuscatedUrlInfoSerializer(info).data
                 for info in ObfuscatedUrlInfo.objects.filter(content=self.get_object())]
        return Response(infos, status=status.HTTP_200_OK, content_type="application/json")
913550
def get_users(self, fetch=True):
        """"""
        return Users(self.resource.users, self.client, populate=fetch)
295175
def list_users(offset=0, limit=20)
      target = "#{self.base_url}/user/"
      options = {
          basic_auth: self.auth,
          query: {
              _limit: limit,
              _offset: offset
          }
      }
      self.class.get(target, options)
    end
203986
def people(self):
        ''''''
        people_response = self.get_request('people/')
        return [Person(self, pjson['user']) for pjson in people_response]