{ "info": { "author": "Ben Timby", "author_email": "btimby@gmail.com", "bugtrack_url": null, "classifiers": [], "description": ".. image:: https://travis-ci.org/btimby/py-radius.svg?branch=master\n :alt: Travis CI Status\n :target: https://travis-ci.org/btimby/py-radius\n\n.. image:: https://coveralls.io/repos/github/btimby/py-radius/badge.svg?branch=master\n :target: https://coveralls.io/github/btimby/py-radius?branch=master\n :alt: Code Coverage\n\n.. image:: https://badge.fury.io/py/py-radius.svg\n :target: https://badge.fury.io/py/py-radius\n\npy-radius\n=========\n\nRADIUS authentication module for Python 2.7.13+\n\n\\(c) 1999 Stuart Bishop \n\nThis module provides basic RADIUS client capabilities, allowing your Python\ncode to authenticate against any RFC2138 compliant RADIUS server.\n\nInstallation\n------------\n\n::\n\n $ pip install py-radius\n\nUsage\n-----\n\nThe radius.py module can be run from the command line, providing a minimal\nRADIUS client to test out RADIUS servers:\n\n::\n\n $ python -m radius\n Host [default: 'radius']: radius\n Port [default: 1812]: 1812\n Enter RADIUS Secret: s3cr3t\n Enter your username: foobar\n Enter your password: qux\n ...\n Authentication Successful\n\nExample\n-------\n\nHere is an example of using the library.\n\n.. code:: python\n\n import radius\n\n radius.authenticate(username, password, secret, host='radius', port=1812)\n\n # - OR -\n\n r = radius.Radius(secret, host='radius', port=1812)\n print('success' if r.authenticate(username, password) else 'failure')\n\nIf your RADIUS server requires challenge/response, the usage is a bit more\ncomplex.\n\n.. code:: python\n\n import radius\n\n r = radius.Radius(secret, host='radius')\n\n try:\n print('success' if r.authenticate(username, password) else 'failure')\n sys.exit(0)\n except radius.ChallengeResponse as e:\n pass\n\n # The ChallengeResponse exception has `messages` and `state` attributes\n # `messages` can be displayed to the user to prompt them for their\n # challenge response. `state` must be echoed back as a RADIUS attribute.\n\n # Send state as an attribute _IF_ provided.\n attrs = {'State': e.state} if e.state else {}\n\n # Finally authenticate again using the challenge response from the user\n # in place of the password.\n print('success' if r.authenticate(username, response, attributes=attrs)\n else 'failure')\n\nThis module has extensive logging, enable it using the Python logging framework.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/btimby/py-radius/", "keywords": "", "license": "Copyright (c) 1999, Stuart Bishop ", "maintainer": "", "maintainer_email": "", "name": "py-radius", "package_url": "https://pypi.org/project/py-radius/", "platform": null, "project_url": "https://pypi.org/project/py-radius/", "project_urls": { "Homepage": "http://github.com/btimby/py-radius/" }, "release_url": "https://pypi.org/project/py-radius/2.0.2-1/", "requires_dist": null, "requires_python": "", "summary": "RADIUS authentication module", "version": "2.0.2-1" }, "last_serial": 2883641, "releases": { "1.0.3-2": [], "2.0.2-1": [ { "comment_text": "", "digests": { "md5": "d32cf96a0513f89577e66ea265a02fe7", "sha256": "70aa2175cca44403e2a3a158b8a50abe7c5b2696dc87fc34fc88d1c68095fe14" }, "downloads": -1, "filename": "py-radius-2.0.2-1.tar.gz", "has_sig": false, "md5_digest": "d32cf96a0513f89577e66ea265a02fe7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8338, "upload_time": "2017-05-18T16:47:04", "url": "https://files.pythonhosted.org/packages/ca/aa/7820c5a529ab54606a78aa425ff6fedd46b807733a23c625dc8e3b0bdc4d/py-radius-2.0.2-1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d32cf96a0513f89577e66ea265a02fe7", "sha256": "70aa2175cca44403e2a3a158b8a50abe7c5b2696dc87fc34fc88d1c68095fe14" }, "downloads": -1, "filename": "py-radius-2.0.2-1.tar.gz", "has_sig": false, "md5_digest": "d32cf96a0513f89577e66ea265a02fe7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8338, "upload_time": "2017-05-18T16:47:04", "url": "https://files.pythonhosted.org/packages/ca/aa/7820c5a529ab54606a78aa425ff6fedd46b807733a23c625dc8e3b0bdc4d/py-radius-2.0.2-1.tar.gz" } ] }