Вопрос

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