i loading image in js this:
var img = new image(); img.onload = function () { .. }; img.src = src;
this work, have realized must secure images on server side oauth 2 (as rest of application) , effect in me receiving 401 unauthorized.
this angular app , have interceptor adding authorization header consequently angular service requests server, in case of course - interceptor not used because call not made in angular context.
any ideas how can add authorization header request?
just add bearer token url:
var img = new image(); img.onload = function () { .. }; img.src = src + '?access_token=mf_9.b5f-4.1jqm';
that, @ least how oauth 2 spec reads: https://tools.ietf.org/html/rfc6750#section-2.3
and although methodology has number of drawbacks, authors forsaw issues things of nature, why there.
Comments
Post a Comment