I am considering using HMAC to sign requests and I want to include the URL as well as other things (e.g. HMAC = verb + url + nonce + timestamp + body). I don't see a simple way to get the request URL that the client sent, it looks like I have to reconstitute it using:
var req_verb = context.getVariable('request.verb'); var req_scheme = context.getVariable('client.scheme'); var req_host = context.getVariable('request.header.host'); var req_request_uri = context.getVariable('request.uri'); var req_url = req_scheme + "://" + req_host + req_request_uri;
Since the message URI includes the basepath, suffix and params, can I assume what the client sent is what Apigee actually gets? Or could it change in transit?
Solved! Go to Solution.
var req_verb = context.getVariable('request.verb');
var req_scheme = context.getVariable('client.scheme');
var req_host = context.getVariable('request.header.host');
var req_request_uri = context.getVariable('request.uri');
var req_url = req_scheme + "://" + req_host + req_request_uri;
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |