You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package is really a simple and working client/server for RADIUS. However, I found that the documentation is a bit too simple, and have already encountered some issues when adopting pyrad.
The first (and only) example in the doc is the Introduction section. The first issue I encountered was that there is no description of what Dictionary("dictionary") really is. (Is it a path to a file, or is it a special keyword?) Under pyrad.client there's also no description for the argument dict, unless delving into the code to figuring out that:
:param dict: RADIUS dictionary under Client.__init__, as well as
:param dict: path of dictionary file or file-like object to read under Dictionary.__init__.
[Suggestion]: Copy the inline doc for each constructors to the main doc.
After that, I started with creating an auth packet, but quickly got confused by what are the valid arguments I could pass to CreateAuthPacket? The pyrad.client page also described nothing for **args. Another inconsistency is that attributes were been passed to function with underscores (eg. User_Name), but were been accessed with hyphens (eg. req["User-Password"]). It turns out that underscores are for args and hyphens are for direct access, which is another undocumented thing.
[Suggestion]: Add a sentence to the index page: "For setting attributes to Client object, you need to replace underscores with hyphens."
[Suggestion]: Add some description for the valid arguments that could be passed to CreateAuthPacket.
After successfully sending auth requests to the server. I then try to craft a accounting request. However, I found that there's one more thing that's misleading! The example passed code=pyrad.packet.AccessRequest to CreateAuthPacket, but by delving into the code, I found that this is in fact absolutely unnecessary, because the AuthPacket constructor already set code=AccessRequest by default!
[Suggestion]: Remove the misleading argument code=pyrad.packet.AccessRequest from the example, or choose to document that it is not necessary to pass that argument.
Other Suggestions
Apart from the above suggestions, it would be better to:
Provide another example for doing an accounting request:
Description
This package is really a simple and working client/server for RADIUS. However, I found that the documentation is a bit too simple, and have already encountered some issues when adopting pyrad.
The first (and only) example in the doc is the Introduction section. The first issue I encountered was that there is no description of what
Dictionary("dictionary")
really is. (Is it a path to a file, or is it a special keyword?) Under pyrad.client there's also no description for the argumentdict
, unless delving into the code to figuring out that::param dict: RADIUS dictionary
underClient.__init__
, as well as:param dict: path of dictionary file or file-like object to read
underDictionary.__init__
.After that, I started with creating an auth packet, but quickly got confused by what are the valid arguments I could pass to
CreateAuthPacket
? The pyrad.client page also described nothing for**args
. Another inconsistency is that attributes were been passed to function with underscores (eg.User_Name
), but were been accessed with hyphens (eg.req["User-Password"]
). It turns out that underscores are for args and hyphens are for direct access, which is another undocumented thing.Client
object, you need to replace underscores with hyphens."CreateAuthPacket
.After successfully sending auth requests to the server. I then try to craft a accounting request. However, I found that there's one more thing that's misleading! The example passed
code=pyrad.packet.AccessRequest
toCreateAuthPacket
, but by delving into the code, I found that this is in fact absolutely unnecessary, because theAuthPacket
constructor already setcode=AccessRequest
by default!code=pyrad.packet.AccessRequest
from the example, or choose to document that it is not necessary to pass that argument.Other Suggestions
The text was updated successfully, but these errors were encountered: