Hi, I am using AccessEntity policy to get developer email :
<AccessEntity name="AccessEntity">
<EntityType value="developer"/>
<EntityIdentifier ref="developer.email" type="developeremail"/>
</AccessEntity>
var email = context.getVariable("developer.email")
How can I do that? Help please ? @dchiesa1 @DChiesa @anilsr
Solved! Go to Solution.
I think your understanding of AccessEntity is not quite right. The policy configuration you are using will retrieve an entire Developer entity, based on the developer email. In other words, the developer email must be an INPUT to the AccessEntity policy you have.
But maybe there is a simpler way of getting what you want. If you have a VerifyAPIKey policy or an OAuthV2/VerifyAccessToken policy, then the context variable apigee.developer.email
gets populated implicitly by the policy when it succeeds. You can then access it in JavaScript with context.getVariable(). You don't need AccessEntity in this case. Does this satisfy your requirement?
I think your understanding of AccessEntity is not quite right. The policy configuration you are using will retrieve an entire Developer entity, based on the developer email. In other words, the developer email must be an INPUT to the AccessEntity policy you have.
But maybe there is a simpler way of getting what you want. If you have a VerifyAPIKey policy or an OAuthV2/VerifyAccessToken policy, then the context variable apigee.developer.email
gets populated implicitly by the policy when it succeeds. You can then access it in JavaScript with context.getVariable(). You don't need AccessEntity in this case. Does this satisfy your requirement?
Yes, this helps! Thank you for correcting me. 🙂
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |