Get tokens by provider
486036
public function getTokens()
    {
        $conditions = '';
        $params = array();
        $records = Oauth_TokenRecord::model()->findAll($conditions, $params);
        return Oauth_TokenModel::populateModels($records);
    }
969899
def get_access_tokens(self, oauth_verifier):
        
        qb_service = OAuth1Service(
            consumer_key=self.consumer_key,
            consumer_secret=self.consumer_secret,
            request_token_url=self.request_token_url,
            access_token_url=self.access_token_url,
            authorize_url=self.authorize_url,
        )

        session = qb_service.get_auth_session(
            self.request_token,
            self.request_token_secret,
            data={'oauth_verifier': oauth_verifier})

        self.access_token = session.access_token
        self.access_token_secret = session.access_token_secret
        return session
300503
def provider(self, service_provider, **kwargs):
        
        getattr(service_provider, '__init__')(kwargs.get('token'))
        return getattr(service_provider, 'read_data')(**kwargs)
378790
def do_get(endpoint, access_token):
    '''
    '''
    headers = {"Authorization": 'Bearer ' + access_token}
    headers['User-Agent'] = get_user_agent()
    return requests.get(endpoint, headers=headers).json()
997076
def get_tokens(self, *, payer_id, credit_card_token_id, start_date, end_date):
        
        payload = {
            "language": self.client.language.value,
            "command": PaymentCommand.GET_TOKENS.value,
            "merchant": {
                "apiLogin": self.client.api_login,
                "apiKey": self.client.api_key
            },
            "creditCardTokenInformation": {
                "payerId": payer_id,
                "creditCardTokenId": credit_card_token_id,
                "startDate": start_date.strftime('%Y-%m-%dT%H:%M:%S'),
                "endDate": end_date.strftime('%Y-%m-%dT%H:%M:%S')
            },
            "test": self.client.is_test
        }
        return self.client._post(self.url, json=payload)
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
962213
def get_token_and_data(self, data):
        '''
        
        '''
        token = ''
        for c in data:
            if c != ')':
                token = token + c
            else:
                break;

        return token, data.lstrip(token + '):')
270573
def get_token(request):
    
    if (not request.META.get(header_name_to_django(auth_token_settings.HEADER_NAME)) and
            config.CHAMBER_MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME):
        ovetaker_auth_token = request.COOKIES.get(config.CHAMBER_MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME)
        token = get_object_or_none(Token, key=ovetaker_auth_token, is_active=True)
        if utils.get_user_from_token(token).is_authenticated():
            return token

    return utils.get_token(request)
338938
def token_get(profile=None, **connection_args):
    '''
    
    '''
    kstone = auth(profile, **connection_args)
    token = kstone.service_catalog.get_token()
    return {'id': token['id'],
            'expires': token['expires'],
            'user_id': token['user_id'],
            'tenant_id': token['tenant_id']}
1190782
function getPaymentByNotificationToken(token, callback) {
    var client = new this.clients.Payments();
    client.getByNotificationToken(token, callback);
  }
784076
def get_token(self):
        """"""
        auth_resp = self.get_auth()

        if auth_resp['status'] == 'mfa_req':
            token_resp = self.get_mfa(auth_resp)
        else:
            token_resp = auth_resp

        token = token_resp['data']['client_token']['client_token']
        return token
378765
def get_token(opts, tok):
    '''
    
    '''
    t_path = os.path.join(opts['token_dir'], tok)
    if not os.path.isfile(t_path):
        return {}
    serial = salt.payload.Serial(opts)
    try:
        with salt.utils.files.fopen(t_path, 'rb') as fp_:
            tdata = serial.loads(fp_.read())
            return tdata
    except (IOError, OSError):
        log.warning(
            'Authentication failure: can not read token file "%s".', t_path)
        return {}
421269
def get_account_tokens(self, address):
        
        cur = self.db.cursor()
        return namedb_get_account_tokens(cur, address)
1107685
def get_tokens(self, node, include_extra=False):
    
    return self.token_range(node.first_token, node.last_token, include_extra=include_extra)
621485
def tokens(self, instance):
        
        if not instance.pk:
            # e.g.: Use will create a new TOTP entry
            return "-"

        totp = TOTP(instance.bin_key, instance.step, instance.t0, instance.digits)

        tokens = []
        for offset in range(-instance.tolerance, instance.tolerance + 1):
            totp.drift = instance.drift + offset
            tokens.append(totp.token())

        return " ".join(["%s" % token for token in tokens])
1256907
function processToken(token, done) {
    var user = _.find(users, function (item) {
        return item.username === token[claims.username];
    });
    if (!user) {
        user = {
            id          : token[claims.id] || currId++,
            username    : token[claims.username],
            email       : token[claims.email],
            firstName   : token[claims.firstName],
            lastName    : token[claims.lastName]
        };
        var roles = token[claims.role];
        if (!roles) {
            roles = ["guest"];
        } else if (!(roles instanceof Array)) {
            roles = [roles];
        }
        user.roles = roles;
        users.push(user);
    }
    done(null, user);
}
1240428
def get_provider(self, provider):
        """"""
        if self.provider is not None:
            return self.provider
        return providers.by_id(provider)