Thank you for the response. The first part is what I was looking for, sorry about the confusion for the second part. How did you do the fancy policy formatting? I am happy to edit this to make it more readable.
Part #1
I was trying something similar to what you describe, and also tried your suggestion, but I am still not getting the callback. I get the other data though. I will outline what I am doing and what I am seeing.
Policies: JavaScript extraction stuff → VerifyAccessToken → GetRedirectInfo → UpdateRequest
I will skip the JavaScript stuff it is just cleaning out headers and extracting access token information and preparing for the next policies.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
VerifyAccessToken
false
VerifyAccessToken
extracted_access_token
Then
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
GetRedirectInfo
Then
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
UpdateRequest
{oauthV2.VerifyAccessToken.failed}
{oauthV2.VerifyAccessToken.fault.name}
{oauthv2authcode.GetRedirectInfo.redirect_uri}
{oauthv2authcode.GetRedirectInfo.redirect_uris}
{oauthv2authcode.GetRedirectInfo.redirect_uris}
{oauthv2authcode.GetRedirectInfo.client_id}
{oauthv2authcode.GetRedirectInfo.client_secret}
{oauthv2authcode.GetRedirectInfo.developer.email}
{oauthv2authcode.GetRedirectInfo.developer.app.name}
{oauthv2authcode.GetRedirectInfo.developer.id} {accesstoken.user_id}
{accesstoken.impersonated_user_id}
{accesstoken.roles}
{client_id}
true
This results in the following values from UpdateRequest:
X-uTest-Token-Validate-Failed false (correct)
X-uTest-Token-Validate-Failed-Reason (nothing — correct)
X-uTest-User ***** (correct)
X-uTest-Roles ***** (correct)
X-uTest-Client-Id ***** (correct)
X-uTest-Token-Redirect
X-uTest-Token-Redirect2
X-uTest-Token-Redirect3
X-uTest-Token-Redirect4
X-uTest-Token-Redirect5
X-uTest-Token-Redirect6
X-uTest-Token-Redirect7
X-uTest-Token-Redirect8
X-uTest-Token-Redirect9
Above where I am setting the headers I have tried without success the following:
oauthv2authcode.{policy}.variable
oauthv2client.{policy}.variable
oauthv2accesstoken.{policy}.variable
based on information I found here :
http://apigee.com/docs/api-services/reference/get-oauth-v2-info-policy
I tried adding to GetRedirectInfo policy in addition to the client id and also tried the various oauthv2authcode, oauthv2client, and oauthv2accesstoken. With some success if I use oauthv2accesstoken. If I use the oauth2accesstoken I can get the following correct values:
oauthv2accesstoken.GetRedirectInfo.client_id
oauthv2accesstoken.GetRedirectInfo.developer.app.name
oauthv2accesstoken.GetRedirectInfo.developer.email
oauthv2accesstoken.GetRedirectInfo.developer.id
Hopefully this all made sense. If I cut to many corners to describe please let me know where I can add clarity.
Thanks!