Get the effective internal password for basic auth Fedora-to-self calls.
This will be the internal password, if set, or the inherited call value
from the default role, if set, or null.
774146
public String getEffectiveInternalPassword() {
        if (m_internalPassword != null) {
            return m_internalPassword;
        } else if (m_defaultConfig != null) {
            return m_defaultConfig.getEffectiveCallPassword();
        } else {
            return null;
        }
    }
21811
def get_password(self, service, username):
        
        service = escape_for_ini(service)
        username = escape_for_ini(username)

        # fetch the password
        try:
            password_base64 = self.config.get(service, username).encode()
            # decode with base64
            password_encrypted = base64.decodestring(password_base64)
            # decrypted the password
            password = self.decrypt(password_encrypted).decode('utf-8')
        except (configparser.NoOptionError, configparser.NoSectionError):
            password = None
        return password
203027
def _load_password_from_keyring(self):
        
        try:
            keyring = __import__('keyring')
            return keyring.get_password(self.repository, self.username)
        except Exception:
            pass
947196
def _get_credentials(server=None,
                     username=None,
                     password=None):
    '''
    
    '''
    jira_cfg = __salt__['config.merge']('jira', default={})
    if not server:
        server = jira_cfg.get('server')
    if not username:
        username = jira_cfg.get('username')
    if not password:
        password = jira_cfg.get('password')
    return server, username, password
649856
def fetch_password_policy(self, credentials):
        
        self.fetchstatuslogger.counts['password_policy']['discovered'] = 0
        self.fetchstatuslogger.counts['password_policy']['fetched'] = 0
        try:
            api_client = connect_service('iam', credentials, silent = True)
            self.password_policy = api_client.get_account_password_policy()['PasswordPolicy']
            if 'PasswordReusePrevention' not in self.password_policy:
                self.password_policy['PasswordReusePrevention'] = False
            else:
                self.password_policy['PreviousPasswordPrevented'] = self.password_policy['PasswordReusePrevention']
                self.password_policy['PasswordReusePrevention'] = True
            # There is a bug in the API: ExpirePasswords always returns false
            if 'MaxPasswordAge' in self.password_policy:
                self.password_policy['ExpirePasswords'] = True
            self.fetchstatuslogger.counts['password_policy']['discovered'] = 1
            self.fetchstatuslogger.counts['password_policy']['fetched'] = 1

        except ClientError as e:
            if e.response['Error']['Code'] == 'NoSuchEntity':
                    self.password_policy = {}
                    self.password_policy['MinimumPasswordLength'] = '1' # As of 10/10/2016, 1-character passwords were authorized when no policy exists, even though the console displays 6
                    self.password_policy['RequireUppercaseCharacters'] = False
                    self.password_policy['RequireLowercaseCharacters'] = False
                    self.password_policy['RequireNumbers'] = False
                    self.password_policy['RequireSymbols'] = False
                    self.password_policy['PasswordReusePrevention'] = False
                    self.password_policy['ExpirePasswords'] = False
            else:
                raise e
        except Exception as e:
            printError(str(e))
428183
public function getBasicResponse()
    {
        // Default the basic response
        if ($this->basicResponse === null) {
            $this->basicResponse = function () {
                if (headers_sent()) {
                    throw new RuntimeException('Attempting basic auth after headers have already been sent.');
                }

                header('WWW-Authenticate: Basic');
                header('HTTP/1.0 401 Unauthorized');

                echo 'Invalid credentials.';
                exit;
            };
        }

        $response = $this->basicResponse;

        return $response();
    }
676347
def get_user_creds(username, password):
    
    username = utils.first_true(
        [username, config["bel_api"]["servers"]["arangodb_username"]], default=""
    )
    password = utils.first_true(
        [password, config["secrets"]["bel_api"]["servers"].get("arangodb_password")],
        default="",
    )

    return username, password
882293
def auth(self):
        
        return self.values.get(Config.AUTH, os.environ.get(AUTH_ENV_KEY_NAME, None))
144018
def get(cls, credential_password_ip_id, permitted_ip_id,
            custom_headers=None):
        

        if custom_headers is None:
            custom_headers = {}

        api_client = client.ApiClient(cls._get_api_context())
        endpoint_url = cls._ENDPOINT_URL_READ.format(cls._determine_user_id(),
                                                     credential_password_ip_id,
                                                     permitted_ip_id)
        response_raw = api_client.get(endpoint_url, {}, custom_headers)

        return BunqResponsePermittedIp.cast_from_bunq_response(
            cls._from_json(response_raw, cls._OBJECT_TYPE_GET)
        )
49199
def get_auth_info():
    
    env_username = os.environ.get('JOTTACLOUD_USERNAME')
    env_password = os.environ.get('JOTTACLOUD_PASSWORD')
    netrc_auth = None
    try:
        netrc_file = netrc.netrc()
        netrc_auth = netrc_file.authenticators('jottacloud.com')
    except IOError:
        # .netrc file doesn't exist
        pass
    netrc_username = None
    netrc_password = None
    if netrc_auth:
        netrc_username, _, netrc_password = netrc_auth
    username = env_username or netrc_username
    password = env_password or netrc_password
    if not (username and password):
        raise JFSError('Could not find username and password in either env or ~/.netrc, '
            'you need to add one of these to use these tools')
    return (username, password)
1279460
def get_password(self):

        '''
             
        '''

        import requests
        url = '%s/mqtt' % self.endpoint
        params = {
            'group': self.group_name
        }
        response = requests.put(url, params=params)
        response_details = response.json()
        self.password = response_details['password']

        return self.password
68393
private float getPasswordStrength() {
        int absoluteScore = 0;
        CharSequence password = getView().getText();

        for (Constraint<CharSequence> constraint : constraints) {
            if (constraint.isSatisfied(password)) {
                absoluteScore++;
            }
        }

        return ((float) absoluteScore / (float) constraints.size());
    }
768182
def handle_authn_response(self, context, internal_response):
        
        return self._handle_authn_response(context, internal_response, self.idp)
1109603
def __get_basic_auth_header(self):
        
        if self.secret_key is None:
            return {}

        # encode/decode for py2/py3 compatibility
        auth_b64 = "%s:%s" % (self.client_id, self.secret_key)
        auth_b64 = base64.b64encode(auth_b64.encode('utf-8'))
        auth_b64 = auth_b64.decode('utf-8')

        return {'Authorization': 'Basic %s' % auth_b64}
627012
def basic_auth(opts)
      user = opts.fetch :user
      pass = opts.fetch :pass

      auth("Basic " + Base64.strict_encode64("#{user}:#{pass}"))
    end
961431
def get_password(self, host=None):
        
        if host is None:
            return self._password_dict
        else:
            try:
                return self._password_dict[host]
            except (KeyError, TypeError):
                try:
                    return self._password_dict['default']
                except (KeyError, TypeError):
                    return None
254405
def getRealmUserPassword(self, realmname, username, environ):
        
        return self.user_manager.get_user_api_key(username, create=True)