Retrieve credentials for `server`. If no credentials are found,
            a `StoreError` will be raised.
171608
def get(self, server):
        
        if not isinstance(server, six.binary_type):
            server = server.encode('utf-8')
        data = self._execute('get', server)
        result = json.loads(data.decode('utf-8'))

        # docker-credential-pass will return an object for inexistent servers
        # whereas other helpers will exit with returncode != 0. For
        # consistency, if no significant data is returned,
        # raise CredentialsNotFound
        if result['Username'] == '' and result['Secret'] == '':
            raise errors.CredentialsNotFound(
                'No matching credentials in {}'.format(self.program)
            )

        return result
473743
def get_credentials():
    
    home_dir = os.path.expanduser('~')
    credential_dir = os.path.join(home_dir, '.credentials')
    if not os.path.exists(credential_dir):
        os.makedirs(credential_dir)
    credential_path = os.path.join(credential_dir,
                                   'calendar-python-quickstart.json')

    store = Storage(credential_path)
    credentials = store.get()
    if not credentials or credentials.invalid:
        flow = client.flow_from_clientsecrets(CLIENT_SECRET_FILE, SCOPES)
        flow.user_agent = APPLICATION_NAME
        if flags:
            credentials = tools.run_flow(flow, store, flags)
        else: # Needed only for compatibility with Python 2.6
            credentials = tools.run(flow, store)
        print('Storing credentials to ' + credential_path)
    return credentials
493089
def check_credentials(self):
        
        if self.username is None or self.password is None:
            raise DistlibException('username and password must be set')
        pm = HTTPPasswordMgr()
        _, netloc, _, _, _, _ = urlparse(self.url)
        pm.add_password(self.realm, netloc, self.username, self.password)
        self.password_handler = HTTPBasicAuthHandler(pm)
715494
def find_credential(self, url):
        
        for repository, cred in self.creds_by_repository.items():
            if url.startswith(repository):
                return cred
1039327
public function getServerCredentials($connection = null, $server = 0)
    {
        $connection = $this->sanitizeConnection($connection);
        $servers = $this->getServersCredentials($connection);

        return (array) Arr::get($servers, $server ?: $connection->server);
    }
1222292
def get_credentials(self, **kwargs):
        """"""
        login = (
            kwargs.get("user") or os.environ.get("POLARION_USERNAME") or self.config.get("username")
        )
        pwd = (
            kwargs.get("password")
            or os.environ.get("POLARION_PASSWORD")
            or self.config.get("password")
        )

        if not all([login, pwd]):
            raise Dump2PolarionException("Failed to submit to Polarion - missing credentials")

        self.credentials = (login, pwd)
771780
def get_user_credentials(self):
        """"""
        password = None
        token = None
        (username, remember_me,
         remember_token) = self._get_credentials_from_settings()
        valid_py_os = not (PY2 and sys.platform.startswith('linux'))
        if username and remember_me and valid_py_os:
            # Get password from keyring
            try:
                password = keyring.get_password('github', username)
            except Exception:
                # No safe keyring backend
                if self._show_msgbox:
                    QMessageBox.warning(self.parent_widget,
                                        _('Failed to retrieve password'),
                                        _('It was not possible to retrieve '
                                          'your password. Please introduce '
                                          'it again.'))
        if remember_token and valid_py_os:
            # Get token from keyring
            try:
                token = keyring.get_password('github', 'token')
            except Exception:
                # No safe keyring backend
                if self._show_msgbox:
                    QMessageBox.warning(self.parent_widget,
                                        _('Failed to retrieve token'),
                                        _('It was not possible to retrieve '
                                          'your token. Please introduce it '
                                          'again.'))

        if not running_under_pytest():
            credentials = DlgGitHubLogin.login(self.parent_widget, username,
                                            password, token, remember_me,
                                            remember_token)

            if (credentials['username'] and credentials['password'] and
                    valid_py_os):
                self._store_credentials(credentials['username'],
                                        credentials['password'],
                                        credentials['remember'])
                CONF.set('main', 'report_error/remember_me',
                         credentials['remember'])

            if credentials['token'] and valid_py_os:
                self._store_token(credentials['token'],
                                  credentials['remember_token'])
                CONF.set('main', 'report_error/remember_token',
                         credentials['remember_token'])
        else:
            return dict(username=username,
                        password=password,
                        token='',
                        remember=remember_me,
                        remember_token=remember_token)

        return credentials
971019
def Credentials(self):
		

		return(clc.v2.API.Call('GET','servers/%s/%s/credentials' % (self.alias,self.name),session=self.session))
805915
def get_session(credentials, config):
    """"""
    session = requests.Session()
    session.verify = False
    auth_url = config.get("auth_url")

    if auth_url:
        cookie = session.post(
            auth_url,
            data={
                "j_username": credentials[0],
                "j_password": credentials[1],
                "submit": "Log In",
                "rememberme": "true",
            },
            headers={"Content-Type": "application/x-www-form-urlencoded"},
        )
        if not cookie:
            raise Dump2PolarionException("Cookie was not retrieved from {}.".format(auth_url))
    else:
        # TODO: can be removed once basic auth is discontinued on prod
        session.auth = credentials

    return session
648849
def find_credentials():
    '''
    
    '''

    # if the username and password were already found don't go through the
    # connection process again
    if 'username' in DETAILS and 'password' in DETAILS:
        return DETAILS['username'], DETAILS['password']

    passwords = __pillar__['proxy']['passwords']
    for password in passwords:
        DETAILS['password'] = password
        if not __salt__['vsphere.test_vcenter_connection']():
            # We are unable to authenticate
            continue
        # If we have data returned from above, we've successfully authenticated.
        return DETAILS['username'], password
    # We've reached the end of the list without successfully authenticating.
    raise excs.VMwareConnectionError('Cannot complete login due to '
                                     'incorrect credentials.')
1008354
def hmget(key, *fields, **options):
    '''
    
    '''
    host = options.get('host', None)
    port = options.get('port', None)
    database = options.get('db', None)
    password = options.get('password', None)
    server = _connect(host, port, database, password)
    return server.hmget(key, *fields)
85000
def _find_credentials():
    '''
    
    '''
    usernames = []
    usernames.append(__pillar__['proxy'].get('admin_username', 'root'))
    if 'fallback_admin_username' in __pillar__.get('proxy'):
        usernames.append(__pillar__['proxy'].get('fallback_admin_username'))

    for user in usernames:
        for pwd in __pillar__['proxy']['passwords']:
            r = salt.modules.dracr.get_chassis_name(
                host=__pillar__['proxy']['host'],
                admin_username=user,
                admin_password=pwd)
            # Retcode will be present if the chassis_name call failed
            try:
                if r.get('retcode', None) is None:
                    __opts__['proxy']['admin_username'] = user
                    __opts__['proxy']['admin_password'] = pwd
                    return (user, pwd)
            except AttributeError:
                # Then the above was a string, and we can return the username
                # and password
                __opts__['proxy']['admin_username'] = user
                __opts__['proxy']['admin_password'] = pwd
                return (user, pwd)

    logger.debug('grains fx2.find_credentials found no valid credentials, using Dell default')
    return ('root', 'calvin')
360940
def get_credentials(*, scopes):
    
    credential_dir = os.path.join(HOME_DIR, ".cache", __package__, "credentials")
    if not os.path.exists(credential_dir):
        os.makedirs(credential_dir)
    credential_path = os.path.join(credential_dir, "googleapis.json")

    store = Storage(credential_path)
    credentials = store.get()

    # see https://developers.google.com/api-client-library/python/auth/web-app
    # kw: "incremental scopes"
    if not credentials or credentials.invalid or not credentials.has_scopes(scopes):
        flow = client.flow_from_clientsecrets(GOOGLE_SECRETS, scopes)
        flow.user_agent = "Bonobo ETL (https://www.bonobo-project.org/)"
        flags = argparser.parse_args(["--noauth_local_webserver"])
        credentials = tools.run_flow(flow, store, flags)
        print("Storing credentials to " + credential_path)
    return credentials
172674
def get_server_public(self, password_verifier, server_private):
        
        return ((self._mult * password_verifier) + pow(self._gen, server_private, self._prime)) % self._prime
941887
def from_credentials(credentials, loop: asyncio.AbstractEventLoop=asyncio.get_event_loop()):
        
        return API(username=credentials.username, password=credentials.password,
                   database=credentials.database, session_id=credentials.session_id,
                   server=credentials.server, loop=loop)
1215336
def get_credentials(self):
        
        return Credentials(access_key=self.aws_access_key_id,
                           secret_key=self.aws_secret_access_key,
                           token=self.aws_session_token)
694078
def get_credentials(options, environment):
    
    if options['--username'] or options['--auth']:
        if not options['--username']:
            options['<username>'] = lib.prompt("Please enter the username for %s..." % environment)
        if not options['--password']:
            options['<password>'] = lib.prompt("Please enter the password for %s..." % environment, secret=True)
    return options