一个实例代表一个信鸽app
@param {int} accessId  应用的唯一标识符，在提交应用时管理系统返回
@param {string} secretKey 应用的secret key，可在配置信息中查看
163886
function XingeApp(accessId, secretKey){

	//效验accessId是否为整形
	if(parseInt(accessId) !== accessId){
		throw new Error('accessId is invalid');
	}

	//效验secretKey是否为非空字符串
	if(typeof secretKey !== 'string' || secretKey.trim().length === 0){
		throw new Error('secretKey is invalid');
	}else{
		secretKey = secretKey.trim();
	}

	this.accessId  = accessId;
	this.secretKey = secretKey;

	/**
	 * 推送消息给单个设备
	 * @param {string}   deviceToken           设备token
	 * @param {Message}  message               推送的消息
     * @param {int}      environment           向iOS设备推送时必填，1表示推送生产环境；2表示推送开发环境。Android可不填。
	 * @param {Function} callback(err, result) 回调函数
	 */
	this.pushToSingleDevice = function(deviceToken, message, environment, callback){

		//效验deviceToken合法性
        deviceToken += '';
        deviceToken = deviceToken.trim();
		if(deviceToken.length === 0){
			throw new Error('deviceToken is invalid');
		}

		//效验message合法性
		if(!(message instanceof AndroidMessage) && !(message instanceof IOSMessage)){
			throw new Error('message is invalid');
		}

        //校验environment合法性
        if(message instanceof IOSMessage && environment !== exports.IOS_ENV_PRO && environment !== exports.IOS_ENV_DEV){
            throw new Error('environment is invalid');
        }

        if(message instanceof AndroidMessage && arguments.length === 3){
            callback = arguments[2];
        }

		//构造请求参数
		var params = {
			access_id: this.accessId,
			timestamp: Math.round((new Date()).getTime() / 1000),
			valid_time: 600,
			expire_time: message.expireTime,
			send_time: message.formatSendTime(),
			device_token: deviceToken,
			message: message.format()
		};

        //如果是Android平台,添加multi_pkg参数;如果是iOS平台，添加environment参数
        if(message instanceof AndroidMessage){
            params.message_type = message.type;
            params.multi_pkg = message.multiPkg;
        }else{
            params.message_type = 0;
            params.environment = environment;
        }

		//调用API
		callAPI(API_PUSH_TO_SINGLE_DEVICE, params, "POST", 10000, this.secretKey, callback);
	};

	/**
	 * 推送消息给单个账户或别名
	 * @param {string}   account               账户或别名
	 * @param {Message}  message               推送的消息
     * @param {int}      environment           向iOS设备推送时必填，1表示推送生产环境；2表示推送开发环境。Android可不填
	 * @param {Function} callback(err, result) 回调函数
     */
	this.pushToSingleAccount = function(account, message, environment, callback){

		//效验account是否为非空字符串
        account += '';
        account = account.trim();
		if(account.length === 0){
			throw new Error('account is invalid');
		}

		//效验message
		if(!(message instanceof AndroidMessage) && !(message instanceof IOSMessage)){
			throw new Error('message is invalid');
		}

        //校验environment合法性
        if(message instanceof IOSMessage && environment !== exports.IOS_ENV_PRO && environment !== exports.IOS_ENV_DEV){
            throw new Error('environment is invalid');
        }

        if(message instanceof AndroidMessage && arguments.length === 3){
            callback = arguments[2];
        }

		//构造请求参数
		var params = {
			access_id: this.accessId,
			timestamp: Math.round((new Date()).getTime() / 1000),
			valid_time: 600,
			expire_time: message.expireTime,
			send_time: message.formatSendTime(),
			account: account,
			message: message.format()
		};

        //如果是Android平台,添加multi_pkg参数;如果是iOS平台，添加environment参数
        if(message instanceof AndroidMessage){
            params.message_type = message.type;
            params.multi_pkg = message.multiPkg;
        }else{
            params.message_type = 0;
            params.environment = environment;
        }

		//调用API
		callAPI(API_PUSH_TO_SINGLE_ACCOUNT, params, "POST", 10000, this.secretKey, callback);

	};

	/**
	 * 推送消息给批量账号
	 * @param {array}    accounts    账号数组
	 * @param {Message}  message     推送的消息
	 * @param {int}      environment 向iOS设备推送时必填，1表示推送生产环境；2表示推送开发环境。Android可不填
	 * @param {Function} callback    回调函数
	 */
	this.pushByAccounts = function(accounts, message, environment, callback){

		//效验accounts
		if(!util.isArray(accounts) || accounts.length === 0){
			throw new Error('accounts is invalid');
		}else{
			for(var i=0; i < accounts.length; i++){
				accounts[i] += '';
				accounts[i] = accounts[i].trim();
				if(accounts[i].length === 0){
					throw new Error('accounts is invalid');
				}
			}
		}

		//效验message
		if(!(message instanceof AndroidMessage) && !(message instanceof IOSMessage)){
			throw new Error('message is invalid');
		}

		//校验environment
		if(message instanceof IOSMessage && environment !== exports.IOS_ENV_PRO && environment !== exports.IOS_ENV_DEV){
			throw new Error('environment is invalid');
		}

		if(message instanceof AndroidMessage && arguments.length === 3){
			callback = arguments[2];
		}

		//构造请求参数
		var params = {
			access_id: this.accessId,
			timestamp: Math.round((new Date()).getTime() / 1000),
			valid_time: 600,
			expire_time: message.expireTime,
			account_list: JSON.stringify(accounts),
			message: message.format()
		};

		//如果是Android平台,添加multi_pkg参数;如果是iOS平台，添加environment参数
		if(message instanceof AndroidMessage){
			params.message_type = message.type;
			params.multi_pkg = message.multiPkg;
		}else{
			params.message_type = 0;
			params.environment = environment;
		}

		//调用API
		callAPI(API_PUSH_BY_ACCOUNTS, params, "POST", 10000, this.secretKey, callback);

	};

	/**
	 * 推送消息到所有设备
	 * @param {Message}  message               推送的消息
     * @param {int}      environment           向iOS设备推送时必填，1表示推送生产环境；2表示推送开发环境。Android可不填
	 * @param {Function} callback(err, result) 回调函数
     */
	this.pushToAllDevices = function(message, environment, callback){

		//效验message
		if(!(message instanceof AndroidMessage) && !(message instanceof IOSMessage)){
			throw new Error('message is invalid');
		}

        //校验environment
        if(message instanceof IOSMessage && environment !== exports.IOS_ENV_PRO && environment !== exports.IOS_ENV_DEV){
            throw new Error('environment is invalid');
        }

        if(message instanceof AndroidMessage && arguments.length === 2){
            callback = arguments[1];
        }

		//构造请求参数
		var params = {
			access_id: this.accessId,
			timestamp: Math.round((new Date()).getTime() / 1000),
			valid_time: 600,
			expire_time: message.expireTime,
			send_time: message.formatSendTime(),
			message: message.format()
		};

        //重复推送
        if(parseInt(message.loopTimes) == message.loopTimes && parseInt(message.loopInterval) == message.loopInterval){
            params.loop_times    = parseInt(message.loopTimes);
            params.loop_interval = parseInt(message.loopInterval);
        }

        //如果是Android平台,添加multi_pkg参数;如果是iOS平台，添加environment参数
        if(message instanceof AndroidMessage){
            params.message_type = message.type;
            params.multi_pkg = message.multiPkg;
        }else{
            params.message_type = 0;
            params.environment = environment;
        }

		//调用API
		callAPI(API_PUSH_TO_ALL_DEVICES, params, "POST", 10000, this.secretKey, callback);

	};

	/**
	 * 根据指定的tag推送消息
	 * @param {array}    tags                  指定推送目标的tag列表，每个tag是一个string
	 * @param {string}   tagOperation          多个tag的运算关系，取值为AND或OR
	 * @param {Message}  message               推送的消息
     * @param {int}      environment           向iOS设备推送时必填，1表示推送生产环境；2表示推送开发环境。Android可不填
	 * @param {Function} callback(err, result) 回调函数
     */
	this.pushByTags = function(tags, tagOperation, message, environment, callback){

		//效验tags
		if(!util.isArray(tags) || tags.length === 0){
			throw new Error('tags is invalid');
		}else{
			for(var i=0; i < tags.length; i++){
                tags[i] += '';
                tags[i] = tags[i].trim();
				if(tags[i].length === 0){
					throw new Error('tags is invalid');
				}
			}
		}

		//效验tagOperation
		if(tagOperation !== exports.TAG_OPERATION_AND && tagOperation !== exports.TAG_OPERATION_OR){
			throw new Error('tagOperation is invalid');
		}

        //效验message
        if(!(message instanceof AndroidMessage) && !(message instanceof IOSMessage)){
            throw new Error('message is invalid');
        }

        //校验environment
        if(message instanceof IOSMessage && environment !== exports.IOS_ENV_PRO && environment !== exports.IOS_ENV_DEV){
            throw new Error('environment is invalid');
        }

        if(message instanceof AndroidMessage && arguments.length === 4){
            callback = arguments[3];
        }

		//构造请求参数
		var params = {
			access_id: this.accessId,
			timestamp: Math.round((new Date()).getTime() / 1000),
			valid_time: 600,
			expire_time: message.expireTime,
			send_time: message.formatSendTime(),
			tags_list: JSON.stringify(tags),
			tags_op: tagOperation,
			message: message.format()
		};

        //重复推送
        if(parseInt(message.loopTimes) == message.loopTimes && parseInt(message.loopInterval) == message.loopInterval){
            params.loop_times    = parseInt(message.loopTimes);
            params.loop_interval = parseInt(message.loopInterval);
        }

        //如果是Android平台,添加multi_pkg参数;如果是iOS平台，添加environment参数
        if(message instanceof AndroidMessage){
            params.message_type = message.type;
            params.multi_pkg = message.multiPkg;
        }else{
            params.message_type = 0;
            params.environment = environment;
        }

		//调用API
		callAPI(API_PUSH_BY_TAGS, params, "POST", 10000, this.secretKey, callback);

	};

	/**
	 * 批量查询推送状态
	 * @param {array}    pushIds               推送id数组
	 * @param {Function} callback(err, result) 回调函数
	 */
	this.queryPushStatus = function(pushIds, callback){

		var arrPushIds = [];

		if(!util.isArray(pushIds) || pushIds.length === 0){
			throw new Error('pushIds is invalid');
		}else{
			for(var i=0; i<pushIds.length; i++){
				var pushId = pushIds[i] + '';
                pushId = pushId.trim();
				if(pushId.length === 0){
					throw new Error('pushIds is invalid');
				}else{
					arrPushIds.push({'push_id': pushId});
				}
			}		
		}

		//构造请求参数
		var params = {
			access_id: this.accessId,
			timestamp: Math.round((new Date()).getTime() / 1000),
			valid_time: 600,
			push_ids: JSON.stringify(arrPushIds)
		};

		//调用API
		callAPI(API_QUERY_PUSH_STATUS, params, "POST", 10000, this.secretKey, callback);

	};

	/**
	 * 查询设备数
	 * @param {Function} callback(err, result) 回调函数
	 */
	this.queryDeviceNum = function(callback){

		//构造查询参数
		var params = {
			access_id: this.accessId,
			timestamp: Math.round((new Date()).getTime() / 1000),
			valid_time: 600
		};

		//调用API
		callAPI(API_QUERY_DEVICE_NUM, params, "POST", 10000, this.secretKey, callback);

	};

	/**
	 * 查询应用标签
	 * @param {int}      start                 开始位置
	 * @param {int}      limit                 查询数量
	 * @param {int}      validTime             配合timestamp确定请求的有效期，单位为秒，最大值为600，默认值600
	 * @param {Function} callback(err, result) 回调函数
	 */
	this.queryTags = function(start, limit, callback){

		//效验start
		if(parseInt(start) !== start || start < 0){
			start = 0;
		}

		//效验limit
		if(parseInt(limit) !== limit || limit < 1){
			limit = 100;
		}

		//构造查询参数
		var params = {
			access_id: this.accessId,
			timestamp: Math.round((new Date()).getTime() / 1000),
			valid_time: 600,
			start: start,
			limit: limit
		};

		//调用API
		callAPI(API_QUERY_TAGS, params, "POST", 10000, this.secretKey, callback);

	};

	/**
	 * 取消尚未触发的定时推送任务
	 * @param {int}      pushId                消息推送id
	 * @param {Function} callback(err, result) 回调函数
	 */
	this.cancelTimingTask = function(pushId, callback){

		//效验pushId
        pushId += '';
        pushId = pushId.trim();
		if(pushId.length === 0){
			throw new Error('pushId is invalid');
		}

		//构造查询参数
		var params = {
			access_id: this.accessId,
			timestamp: Math.round((new Date()).getTime() / 1000),
			valid_time: 600,
			push_id: pushId
		};

		//调用API
		callAPI(API_CANCEL_TIMING_TASK, params, "POST", 10000, this.secretKey, callback);

	};

    /**
     * 批量为token设置标签
     * @param {array}    tagsTokensMap         tag和token的二维数组，每次最多设置20对。如：[['tag1', 'token1'], ['tag2', 'token2']]。
     * @param {Function} callback(err, result) 回调函数
     */
    this.setTags = function(tagsTokensMap, callback){

        var isTagsTokensMapValid = true;

        //校验tagsTokensMap
        if(!util.isArray(tagsTokensMap) || tagsTokensMap.length < 1 || tagsTokensMap.length > 20){
            isTagsTokensMapValid = false;
        }else{
            for(var i = 0; i < tagsTokensMap.length; i++){
                if(!util.isArray(tagsTokensMap[i]) || tagsTokensMap[i].length !== 2){
                    isTagsTokensMapValid = false;
                    break;
                }else{

                    tagsTokensMap[i][0] += '';
                    tagsTokensMap[i][0] = tagsTokensMap[i][0].trim();

                    tagsTokensMap[i][1] += '';
                    tagsTokensMap[i][1] = tagsTokensMap[i][1].trim();

                    if(tagsTokensMap[i][0].length === 0 || tagsTokensMap[i][1] === 0){
                        isTagsTokensMapValid = false;
                        break;
                    }

                }
            }
        }

        if(!isTagsTokensMapValid){
            throw new Error('tagsTokensMap is invalid');
        }

        //构造查询参数
        var params = {
            access_id: this.accessId,
            timestamp: Math.round((new Date()).getTime() / 1000),
            valid_time: 600,
            tag_token_list: JSON.stringify(tagsTokensMap)
        };

        //调用API
        callAPI(API_SET_TAGS, params, "POST", 10000, this.secretKey, callback);

    };

    /**
     * 批量为token删除标签
     * @param {array}    tagsTokensMap         tag和token的二维数组，每次最多设置20对。如：[['tag1', 'token1'], ['tag2', 'token2']]。
     * @param {Function} callback(err, result) 回调函数
     */
    this.deleteTags = function(tagsTokensMap, callback){

        var isTagsTokensMapValid = true;

        //校验tagsTokensMap
        if(!util.isArray(tagsTokensMap) || tagsTokensMap.length < 1 || tagsTokensMap.length > 20){
            isTagsTokensMapValid = false;
        }else{
            for(var i = 0; i < tagsTokensMap.length; i++){
                if(!util.isArray(tagsTokensMap[i]) || tagsTokensMap[i].length !== 2){
                    isTagsTokensMapValid = false;
                    break;
                }else{

                    tagsTokensMap[i][0] += '';
                    tagsTokensMap[i][0] = tagsTokensMap[i][0].trim();

                    tagsTokensMap[i][1] += '';
                    tagsTokensMap[i][1] = tagsTokensMap[i][1].trim();

                    if(tagsTokensMap[i][0].length === 0 || tagsTokensMap[i][1] === 0){
                        isTagsTokensMapValid = false;
                        break;
                    }

                }
            }
        }

        if(!isTagsTokensMapValid){
            throw new Error('tagsTokensMap is invalid');
        }

        //构造查询参数
        var params = {
            access_id: this.accessId,
            timestamp: Math.round((new Date()).getTime() / 1000),
            valid_time: 600,
            tag_token_list: JSON.stringify(tagsTokensMap)
        };

        //调用API
        callAPI(API_DELETE_TAGS, params, "POST", 10000, this.secretKey, callback);

    };

    /**
     * 根据设备token查询标签
     * @param {string}   deviceToken 设备token
     * @param {function} callback    回调函数
     */
    this.queryTagsByDeviceToken = function(deviceToken, callback){

        //校验token
        deviceToken += '';
        deviceToken = deviceToken.trim();

        if(deviceToken.length === 0){
            throw new Error('deviceToken is invalid');
        }

        //构造查询参数
        var params = {
            access_id: this.accessId,
            timestamp: Math.round((new Date()).getTime() / 1000),
            valid_time: 600,
            device_token: deviceToken
        };

        //调用API
        callAPI(API_QUERY_TAGS_BY_DEVICE_TOKEN, params, "POST", 10000, this.secretKey, callback);
    };

    /**
     * 根据标签查询设备数
     * @param {string}   tag      标签
     * @param {function} callback 回调函数
     */
    this.queryDeviceNumByTag = function(tag, callback){

        //校验tag
        tag += '';
        tag = tag.trim();

        if(tag.length === 0){
            throw new Error('tag is invalid');
        }

        //构造查询参数
        var params = {
            access_id: this.accessId,
            timestamp: Math.round((new Date()).getTime() / 1000),
            valid_time: 600,
            tag: tag
        };

        //调用API
        callAPI(API_QUERY_DEVICE_NUM_BY_TAG, params, "POST", 10000, this.secretKey, callback);
    };


}
301544
function validateAWSConfig(awsConfig){
    return validateAccessKeyID(awsConfig.accessKeyId) &&
    validateSecretAccessKey(awsConfig.secretAccessKey) &&
    validateAWSRegion(awsConfig.region)
}
101383
public static JSONObject oauth(String apiKey, String secretKey, AipClientConfiguration config) {
        try {
            AipRequest request = new AipRequest();
            request.setUri(new URI(AipClientConst.OAUTH_URL));
            request.addBody("grant_type", "client_credentials");
            request.addBody("client_id", apiKey);
            request.addBody("client_secret", secretKey);
            request.setConfig(config);
            int statusCode = 500;
            AipResponse response = null;
            // add retry
            int cnt = 0;
            while (statusCode == 500 && cnt < 3) {
                response = AipHttpClient.post(request);
                statusCode = response.getStatus();
                cnt++;
            }
            String res = response.getBodyStr();
            if (res != null && !res.equals("")) {
                return new JSONObject(res);
            } else {
                return Util.getGeneralError(statusCode, "Server response code: " + statusCode);
            }
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }
        return Util.getGeneralError(-1, "unknown error");
    }
1140626
function addAccessControl () {
    // no access control if accessIdName not set
    if (!defined(this.args.accessIdName)) {
        return
    }
    // access id column is on primary table/record
    var alias = this.alias
    // validate column name - throw error
    var column = this.model.columnName(this.args.accessIdName, true)
    // get quoted column name
    column = this.quoteName(column)
    // get param name for value placeholder
    var paramName = this.newParam(this.args.accessIdName)
    // set value for param placeholder
    this.params[paramName] = this.args.accessId
    // add UNHEX for binary ids
    var placeholder = this.unhexId(`:${paramName}`)
    // add where SQL
    this.where.push(`${alias}.${column} = ${placeholder}`)   
}
255939
private RoleSet rolesForAccessId(String accessId) {
        RoleSet roles = getRoleSet(accessIdToRoles, accessId);
        if (roles == null) {
            return findRolesForAccessId(accessId);
        } else {
            return roles;
        }
    }
1192665
def secret_access_key(ecs_secret_access_key):
    """"""
    if not ecs_secret_access_key:
        click.secho(dtool_config.utils.get_ecs_secret_access_key(CONFIG_PATH))
    else:
        click.secho(dtool_config.utils.set_ecs_secret_access_key(
            CONFIG_PATH,
            ecs_secret_access_key
        ))
306806
public static void init(final String appid,final String secret,int initialDelay,int delay){
		if(scheduledExecutorService == null){
			initScheduledExecutorService();
		}
		if(firestAppid == null){
			firestAppid = appid;
		}
		if(futureMap.containsKey(appid)){
			futureMap.get(appid).cancel(true);
		}
		//立即执行一次
		if(initialDelay == 0){
			doRun(appid, secret);
		}
		ScheduledFuture<?> scheduledFuture =  scheduledExecutorService.scheduleWithFixedDelay(new Runnable() {
			@Override
			public void run() {
				doRun(appid, secret);
			}
		},initialDelay == 0 ? delay : initialDelay,delay,TimeUnit.SECONDS);
		futureMap.put(appid, scheduledFuture);
		logger.info("appid:{}",appid);
	}
1162853
private static <R> RowKey buildRowKey(AssociationKey associationKey, R row, AssociationRowAccessor<R> accessor) {
		String[] columnNames = associationKey.getMetadata().getRowKeyColumnNames();
		Object[] columnValues = new Object[columnNames.length];

		for ( int i = 0; i < columnNames.length; i++ ) {
			String columnName = columnNames[i];
			columnValues[i] = associationKey.getMetadata().isKeyColumn( columnName ) ? associationKey.getColumnValue( columnName ) : accessor.get( row, columnName );
		}

		return new RowKey( columnNames, columnValues );
	}
843153
@JsonIgnore
	public Map<String, String> getCredentials() {
		if (getId() == null) {
			return Collections.emptyMap();
		} else {
			Map<String, String> keys = new LinkedHashMap<String, String>(2);
			keys.put("accessKey", getId());
			keys.put("secretKey", getSecret());
			return keys;
		}
	}
95510
protected void configureEncryptionKeyFromPublicKeyResource(final String secretKeyToUse) {
        val object = extractPublicKeyFromResource(secretKeyToUse);
        LOGGER.debug("Located encryption key resource [{}]", secretKeyToUse);
        setSecretKeyEncryptionKey(object);
        setEncryptionAlgorithm(KeyManagementAlgorithmIdentifiers.RSA_OAEP_256);
    }
252128
public static void setEncryptionKey(final String key) {

		if (key == null) {

			logger.info("set_encryption_key() was called with null parameter, resetting global secret key");

			// reset hash
			secretKeyHash = null;
			return;
		}

		try {

			secretKeyHash = MessageDigest.getInstance(HASH_ALGO).digest(key.getBytes("UTF-8"));

		} catch (Throwable t) {
			logger.error("Unable to set secret key: {}", t.getMessage());
		}
	}
262186
def extend_access_token(self, app_id, app_secret):
        
        args = {
            "client_id": app_id,
            "client_secret": app_secret,
            "grant_type": "fb_exchange_token",
            "fb_exchange_token": self.access_token,
        }

        return self.request(
            "{0}/oauth/access_token".format(self.version), args=args
        )
1009580
public static Jscode2sessionResult jscode2session(String appid,String secret,String js_code){
		HttpUriRequest httpUriRequest = RequestBuilder.get()
			.setUri(BASE_URI + "/sns/jscode2session")
			.addParameter("appid",appid)
			.addParameter("secret",secret)
			.addParameter("js_code",js_code)
			.addParameter("grant_type","authorization_code")
			.build();
		return LocalHttpClient.executeJsonResult(httpUriRequest,Jscode2sessionResult.class);
	}
1215629
public void sessionAccessUnknownKey(Object key) {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, "sessionAccessUnknownKey", "sessionObservers.size()=" + _sessionObservers.size());
        }
        if (_sessionObservers == null || _sessionObservers.size() < 1) {
            return;
        }

        // ArrayList sessionObservers = null;
        // synchronized(_sessionObservers) {
        // sessionObservers = (ArrayList)_sessionObservers.clone();
        // }

        ISessionObserver sessionObserver = null;
        for (int i = 0; i < _sessionObservers.size(); i++) {
            sessionObserver = (ISessionObserver) _sessionObservers.get(i);
            sessionObserver.sessionAccessUnknownKey(key);
        }

    }
913406
public static String getAppAccessToken(String clientId, String clientSecret) {
		return getAccessToken(clientId, clientSecret, null, null);
	}
67878
function takeAccessToken(callback){
  callback = callback || noop;
  process.stdin.resume();
  process.stdin.setEncoding('utf8');
  process.stdout.write(tips.input_access_token);
  process.stdin.on('data', function (text) {
    var conf = new (require('./config').Config)(confPath);
    console.log('confPath: ' + confPath)
    text = text.trim();
    process.stdin.removeListener('data', arguments.callee);
    process.stdin.pause();
    
    if(text){
      log('a new access token: ' + text);
      conf.set('tsina.access_token', text)
      conf.save()
      callback(text);
    }else{
      open(getAccessTokenUrl());
      takeAccessToken(callback);
    }
  });
}
684326
def post_event_access_code(self, id, access_code_id, **data):
        
        
        return self.post("/events/{0}/access_codes/{0}/".format(id,access_code_id), data=data)