如何在简单语音示例应用程序(ATT 语音 API)中添加凭据

问题描述 投票:0回答:1

如何在简单的语音示例应用程序 ATT 语音 API speechConfig.m 中添加凭据?

/** Unobfuscates the OAuth client_id credential for the application. **/
NSString* SpeechOAuthKey(void)
{
    #error Add code to unobfuscate your Speech API credentials, then delete this line.
    return MY_UNOBFUSCATE(my_obfuscated_client_id);
}

/** Unobfuscates the OAuth client_secret credential for the application. **/
NSString* SpeechOAuthSecret(void)
{
    #error Add code to unobfuscate your Speech API credentials, then delete this line.
    return MY_UNOBFUSCATE(my_obfuscated_client_secret);
}

如有任何帮助,我们将不胜感激。

ios speech
1个回答
0
投票

如果您只想使用未混淆的凭据(不安全)运行代码,只需注释掉“#error”行并返回作为您的门户应用程序密钥和秘密的字符串。

当您准备好生产应用程序时,您应该研究您最喜欢的安全例程,以取消混淆将存储在应用程序中的密钥和秘密,并将其包装在从以下位置返回未混淆的纯文本密钥/秘密的方法中:代码附带的模糊密钥/秘密。

如果您仍需要更多帮助,请在developer.att.com 门户的“支持->记录票证”下记录票证。

© www.soinside.com 2019 - 2024. All rights reserved.