I am trying to implement the digest auth algorithm in angular. However, the lack of knowledge about the requests angular will send stops me from perceiving that goal. My approach is to transform the request via the

$httpProvider.defaults.transformRequest

route. But the functions I provide

function (data, headersGetter)

obviously is not provided with any knowledge about the upcoming request. Since I have no knowledge about the request URI (but especially the method, such as PUT, GET etc.)at all it is impossible to calculate a correct digest hash.

Does anybody know how a transformRequest function can get the URI and the method on which the request is targeted ?

有帮助吗?

解决方案

Indeed this functionality is now commonly provided via http://ngmodules.org/modules/angular-digest-auth

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top