[SR-Users] negative www_authorize result codes

Daniel-Constantin Mierla miconda at gmail.com
Wed Nov 9 08:44:16 CET 2011


Hello,

On 11/9/11 3:10 AM, Juha Heinanen wrote:
> auth_db/README tells this about www_authorize() negative result codes:
>
>     Negative codes may be interpreted as follows:
>       * -1 (generic error) - some generic error occurred and no reply was
>         sent out;
>       * -2 (invalid password) - valid user, but wrong password;
>       * -3 (invalid user) - authentication user does not exist.
>
> whereas in auth_radius i return:
>
>     Negative result codes may be interpreted as follows:
>       * -7 (internal error) - some internal error occurred (see syslog);
>       * -6 (nonce reused) - nonce is used more than once;
>       * -5 (no credentials) - credentials were not found in request;
>       * -4 (stale nonce) - stale nonce;
>       * -3 (authorization failed) - RADIUS responded with Access Reject
>         which may be, for example, due to user not found or wrong password;
>       * -1 (error) - some error occured during authorization (see syslog);
>
> since both modules depend on the same auth module, why does
> www_authorize return the full set of negative result codes or is its
> README out of date?
quick look into the code and the README seems outdated. But there is no 
-7 return code in auth and auth_db -- return codes are taken from 
modules/auth/api.h, structure auth_cfg_result_t. Maybe -7 is specific 
for radius auth function.

Cheers,
Daniel
-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Dec 5-8, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list