Functions
<function>radius_www_authorize(realm)</function> The function verifies credentials according to RFC2617. If the credentials are verified successfully then the function will succeed and mark the credentials as authorized (marked credentials can be later used by some other functions). If the function was unable to verify the credentials for some reason then it will fail and the script should call www_challenge which will challenge the user again. This function will, in fact, perform sanity checks over the received credentials and then pass them along to the radius server which will verify the credentials and return whether they are valid or not. Meaning of the parameter is as follows: realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. If an empty string "" is used then the server will generate it from the request. In case of REGISTER requests To header field domain will be used (because this header field represents a user being registered), for all other messages From header field domain will be used. <function>radius_www_authorize</function> usage ... if (!radius_www_authorize("iptel.org")) { www_challenge("iptel.org", "1"); }; ...
<function moreinfo="none">radius_proxy_authorize(realm)</function> The function verifies credentials according to RFC2617. If the credentials are verified successfully then the function will succeed and mark the credentials as authorized (marked credentials can be later used by some other functions). If the function was unable to verify the credentials for some reason then it will fail and the script should call proxy_challenge which will challenge the user again. This function will, in fact, perform sanity checks over the received credentials and then pass them along to the radius server which will verify the credentials and return whether they are valid or not. Meaning of the parameter is as follows: realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. If an empty string "" is used then the server will generate it from the request. From header field domain will be used as realm. proxy_authorize usage ... if (!radius_proxy_authorize("")) { proxy_challenge("", "1"); # Realm will be autogenerated }; ...