Gets the application secret key.
        The value can be stored in parameters "access_key", "client_key" or "secret_key".

        :return: the application secret key.
175416
def get_access_key(self):
        
        access_key = self.get_as_nullable_string("access_key")
        access_key = access_key if access_key != None else self.get_as_nullable_string("access_key")
        return access_key
920697
def access_token(self):
        
        if self._cached_access_token is not None:
            return self._cached_access_token
        resp = self._request(endpoint='access_token', data={'grant_type': 'client_credentials', 'scope': 'basic user'},
                             auth=(self.api_username, self.api_key))
        self._cached_access_token = resp['access_token']
        return self._cached_access_token
670032
def get_key(key=None, keyfile=None):
    
    if key is None:
        if keyfile is None:
            key = environ.get('CRYPTOYAML_SECRET')
            if key is None:
                raise MissingKeyException(
                    '''You must either provide a key value,'''
                    ''' a path to a key or its value via the environment variable '''
                    ''' CRYPTOYAML_SECRET'''
                )
            else:
                key = key.encode('utf-8')
        else:
            key = open(keyfile, 'rb').read()
    return key
68244
public function request_accesskey() {
        global $CFG, $USER;

        require_once($CFG->libdir . '/filelib.php');

        // Sending the request access key request to Airnotifier.
        $serverurl = $CFG->airnotifierurl . ':' . $CFG->airnotifierport . '/accesskeys/';
        // We use an APP Key "none", it can be anything.
        $header = array('Accept: application/json', 'X-AN-APP-NAME: ' . $CFG->airnotifierappname,
            'X-AN-APP-KEY: none');
        $curl = new curl();
        $curl->setHeader($header);

        // Site ids are stored as secrets in md5 in the Moodle public hub.
        $params = array(
            'url' => $CFG->wwwroot,
            'siteid' => md5($CFG->siteidentifier),
            'contact' => $USER->email,
            'description' => $CFG->wwwroot
            );
        $resp = $curl->post($serverurl, $params);

        if ($key = json_decode($resp, true)) {
            if (!empty($key['accesskey'])) {
                return $key['accesskey'];
            }
        }
        debugging("Unexpected response from the Airnotifier server: $resp");
        return false;
    }
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)
142021
def current_api_key():
    
    if app.config.get('IGNORE_AUTH'):
        return models.ApiKey(
            id='anonymous_superuser',
            secret='',
            superuser=True)

    ops = _get_api_key_ops()
    api_key = ops.get()
    logging.debug('Authenticated as API key=%r', api_key.id)

    return api_key
880575
def client(self):
        
        if self._client is None:
            self._client = KeycloakClient(server_url=self._server_url,
                                          headers=self._headers)
        return self._client
378064
public String getAccessKeyAsString() {
		char accessKey = getAccessKey();

		if (Character.isLetterOrDigit(accessKey)) {
			return String.valueOf(accessKey);
		}

		return null;
	}
223838
def get_s3_key(self):
        
        try:
            c = s3.connect_to_region(self._region,
                                     aws_access_key_id=self._aws_access_key_id,
                                     aws_secret_access_key=self._aws_secret_access_key)
            bucket = c.get_bucket(self._s3_bucket)
            key = bucket.get_key(self._s3_name)
            self._key_file = StringIO(unicode(key.get_contents_as_string().decode()))
            self._key_file.seek(0)
            key.close()
        except NoAuthHandlerFound:
            raise SergentSshException('Boto said that you should check your credentials')
        except S3ResponseError as e:
            logger.exception(e)
            raise SergentSshException('bucket %s or key %s not found' % (self._s3_bucket, self._s3_name))
528328
def get_privileges(self, application=None, name=None, params=None):
        
        return self.transport.perform_request(
            "GET",
            _make_path("_security", "privilege", application, name),
            params=params,
        )
24817
def _get_access_token(self):
        
        if self._service_token:
            logger.info('Use service token: %s',
                        5 * '*' + self._service_token[50:])
            return self._service_token

        if not all([self.app_id, self._login, self._password]):
            raise ValueError(
                'app_id=%s, login=%s password=%s (masked) must be given'
                % (self.app_id, self._login,
                   '*' * len(self._password) if self._password else 'None'))

        logger.info("Getting access token for user '%s'" % self._login)
        with self.http_session as s:
            if self._client_secret:
                url_query_params = self.do_direct_authorization(session=s)
            else:
                self.do_login(http_session=s)
                url_query_params = self.do_implicit_flow_authorization(session=s)
            logger.debug('url_query_params: %s', url_query_params)

        if 'access_token' in url_query_params:
            logger.info('Access token has been gotten')
            return url_query_params['access_token']
        else:
            raise VkAuthError('OAuth2 authorization error. Url params: %s'
                              % url_query_params)
1285555
def retrieve_client_credentials(self):
        
        client_id = self.params.get('client_id')
        client_secret = self.params.get('client_secret')
        return (client_id, client_secret)
1114912
def client(self):
        
        ctx = stack.top
        attr_name = self._config_key("client")
        if ctx is not None:
            if not hasattr(ctx, attr_name):
                setattr(
                    ctx,
                    attr_name,
                    BankIDClient(
                        (
                            current_app.config.get(self._config_key("CERT_PATH")),
                            current_app.config.get(self._config_key("KEY_PATH")),
                        ),
                        current_app.config.get(self._config_key("TEST_SERVER")),
                    ),
                )
            return getattr(ctx, attr_name)
1210284
def getsecret(self, section, option, **kwargs):
        
        # keyword-only arguments, vars and fallback are directly passed through
        raw = kwargs.get('raw', False)
        value = self.get(section, option, **kwargs)
        if raw:
            return value
        return self.custodia_client.get_secret(value)
1005568
def get_credentials(self):
        
        return ReadOnlyCredentials(
            self.access_token, self.client_id, self.client_secret,
            self.refresh_token
        )
1315180
def get_app_token(self, scope):
        """"""

        app_token = self.__get_app_token(scope)

        if app_token:
            return app_token

        if self.__cache is not None:
            token = self.__cache.get(self.__app_token_cache_key(scope))
            if token:
                return token

        self.__app_token = None

        payload = {
            'grant_type': 'client_credentials',
            'scope': scope
        }

        url = settings.AUTH_ENDPOINT + '/token'
        r = post(url, data=payload, auth=HTTPBasicAuth(self.__client_id, self.__client_secret), verify=self.__verify_cert)
        if r.status_code == 200:
            data = r.json()
            self.__set_app_token(scope, data[u'access_token'])
            if self.__cache is not None:
                self.__cache.set(self.__app_token_cache_key(scope), str(data[u'access_token']),
                                 data[u'expires_in'] - 300)

        app_token = self.__get_app_token(scope)

        if not app_token:
            raise MxitAPIException("Failed to retrieve app token for '%s' scope" % scope)

        return app_token
293847
def get_current_key(self, resource_name):
        
        url = ENCRYPTION_CURRENT_KEY_URL.format(resource_name)
        return self._key_from_json(self._get_resource(url))