在响应中,在api中生成oauth令牌 我们需要加密oauth令牌,然后用时间戳加盐并哈希吧
使用客户端凭据,客户端正在接近apigee。但作为回应如何加密oauth令牌,然后盐与时间戳和哈希呢?
curl https://{org}-test.apigee.net/oauth/client_credential/
accesstoken?grant_type=client_credentials -X POST -d
'client_id={consumer_key}&client_secret={consumer_secret}'
响应如下
{
"issued_at" : "1382703699776",
"application_name" : "8586c7b7-2936-4779-b7a6-97014e436d7d",
"scope" : "READ",
"status" : "approved",
"api_product_list" : "[PremiumWeatherAPI]",
"expires_in" : "3599",
"developer.email" : "tesla@weathersample.com",
"organization_id" : "0",
"client_id" : "SJOaCEGohSu3vpNswMs5YdBlc2GOAh1J",
"access_token" : "UAj2yiGAcMZGxfN2DhcUbl9v8WsR",
"organization_name" : "myorg",
"refresh_token_expires_in" : "0",
"refresh_count" : "0"
}
作为响应,我需要使用时间戳加密oauth访问令牌和salt,然后对其进行哈希处理。 怎么做
答案 0 :(得分:0)
您可以使用以下方法:
oauthv2accesstoken.{policy_name}.access_token
变量。使用assign message策略将此值分配给变量。