Sets the api_key of this GlobalSignCredentials.
        Unique ID for API client (provided by GlobalSign). 

        :param api_key: The api_key of this GlobalSignCredentials.
        :type: str
349540
def api_key(self, api_key):
        
        if api_key is None:
            raise ValueError("Invalid value for `api_key`, must not be `None`")
        if api_key is not None and len(api_key) > 1000:
            raise ValueError("Invalid value for `api_key`, length must be less than or equal to `1000`")

        self._api_key = api_key
968936
public static TrainingApi authenticate(RestClient restClient, final String apiKey) {
        return new TrainingApiImpl(restClient).withApiKey(apiKey);
    }
136588
def set_client_key(self, zmq_socket, client_secret_key_path, server_public_key_path):
        ''''''
        load_and_set_key(zmq_socket, client_secret_key_path)
        server_public, _ = zmq.auth.load_certificate(server_public_key_path)
        zmq_socket.curve_serverkey = server_public
1040448
def create_api_key(self):
        """"""
        apikeys = self.client.get_api_keys()
        for key in apikeys['items']:
            if key['name'] == self.app_name:
                self.log.info("Key %s already exists", self.app_name)
                break
        else:
            self.client.create_api_key(
                name=self.app_name, enabled=True, stageKeys=[{
                    'restApiId': self.api_id,
                    'stageName': self.env
                }])
            self.log.info("Successfully created API Key %s. Look in the AWS console for the key", self.app_name)
135626
def _add_eutils_api_key(url):
    
    apikey = os.environ.get("NCBI_API_KEY")
    if apikey:
        url += "&api_key={apikey}".format(apikey=apikey)
    return url
4345
public function setApiClient($api_client)
    {
        if (! class_exists($api_client) || ! method_exists($api_client, 'call')) {
            throw new DataSift_Exception_InvalidData('Class "' . $api_client . '" does not exist');
        }

        $this->_api_client = $api_client;
    }
1152283
public void setApiKey(String apiKey) {
        if (this.jsonHttpClient != null) {
            this.jsonHttpClient.setApiKey(apiKey);
        }
        if (this.restApiClient != null) {
            this.restApiClient.setApiKey(apiKey);
        }
        if (this.swaggerApiClient != null) {
            ApiKeyAuth genieKey = (ApiKeyAuth) this.swaggerApiClient.getAuthentication("GenieKey");
            genieKey.setApiKeyPrefix("GenieKey");
            genieKey.setApiKey(apiKey);
        }
    }
801688
def api_retrieve(self, api_key=None):
		
		api_key = api_key or self.default_api_key

		return self.stripe_class.retrieve(
			id=self.id, api_key=api_key, expand=self.expand_fields
		)
968729
def api_secret(self, api_secret):
        
        if api_secret is None:
            raise ValueError("Invalid value for `api_secret`, must not be `None`")
        if api_secret is not None and len(api_secret) > 250:
            raise ValueError("Invalid value for `api_secret`, length must be less than or equal to `250`")

        self._api_secret = api_secret
518472
def superuser_api_key_required(f):
    """"""
    @functools.wraps(f)
    def wrapped(*args, **kwargs):
        api_key = current_api_key()
        g.api_key = api_key

        utils.jsonify_assert(
            api_key.superuser,
            'API key=%r must be a super user' % api_key.id,
            403)

        return f(*args, **kwargs)

    return wrapped
178217
def authenticate_key(api_key):
    
    user_model = Query()
    user = db.search(user_model.api_key == api_key)[0]
    if user:
        return user['username']
    return False
562987
def api_key(self):
        
        if not self._api_key:
            error_msg = (
                f"Email is enabled but API_KEY is not set. "
                f"See settings.{self.api_key_attr}"
            )
            try:
                self._api_key = getattr(settings, self.api_key_attr)
            except AttributeError:
                raise EmailNotEnabledError(error_msg, code="api_key_attribute_error")
            else:
                if not self._api_key:
                    raise EmailNotEnabledError(error_msg, code="api_key_is_none")
        return self._api_key
1017040
def _register_client(self, client, region_name):
        
        for item in client.meta.method_to_api_mapping:
            method = getattr(client, item)
            wrapped_method = functools.partial(self._wrap_client, region_name, method)
            setattr(client, item, wrapped_method)
911819
def set_temp_url_key(self, key=None):
        
        if key is None:
            key = uuid.uuid4().hex
        meta = {"Temp-Url-Key": key}
        self.set_account_metadata(meta)
        self._cached_temp_url_key = key
1023792
def getAPIKey(self, keyID=None):
        
        kcfg = self.getKeyConfig(keyID)
        if 'key' not in kcfg:
            raise ConfigException('invalid config: missing api key')
        return kcfg['key']
396606
def _unique_key(job):
    
    return unique_key(testtype=str(job['testtype']),
                      buildtype=str(job['platform_option']),
                      platform=str(job['platform']))
68957
public void setApiKeys(java.util.Collection<ApiKey> apiKeys) {
        if (apiKeys == null) {
            this.apiKeys = null;
            return;
        }

        this.apiKeys = new java.util.ArrayList<ApiKey>(apiKeys);
    }